connect
Connects to the Phoenix Socket. Suspends until the server acknowledges the connection.
Internally, calling this function launches a long-living coroutine listening for SocketEvent that will either:
on SocketEvent.FailureEvent: Propagate a Channel.Event.ERROR event to all opened Channel.
on SocketEvent.CloseEvent: Propagate a Channel.Event.ERROR event to all opened Channel, cancel this coroutine and the heartbeatJob, and try to reconnect to the Socket if it closed abnormally.
on SocketEvent.MessageEvent: Dispatch the server Message to all opened Channel bound to the given topic.
Return
a SharedFlow of SocketEvent