Socket
A Socket which connects to a Phoenix Socket. Takes a closure to allow for changing parameters to be sent to the server when connecting.
Example
val socket = Socket("https://example.com/socket", { mapOf("token" to mAuthToken) })
Parameters
Url to connect to such as https://example.com/socket
Closure which allows to change parameters sent during connection.
JSON Serializer version to use. Defaults to 2.0.0
Optional. Provide a custom JSON encoding implementation
Optional. Provide a custom JSON decoding implementation
Constructors
Functions
Connects to the Phoenix Socket. Suspends until the server acknowledges the connection.
Connects to the Phoenix Socket. Suspends until the server acknowledges the connection.
Connects to the Phoenix Socket. Suspends until the server acknowledges the connection.
Disconnects from the Phoenix Socket and resets the reconnectTimer.
Disconnects from the Phoenix Socket and resets the reconnectTimer.
Disconnects from the Phoenix Socket and resets the reconnectTimer.
Properties
The fully qualified socket URL
The fully qualified socket URL
Interval between Socket reconnect attempts, in ms
Interval between Socket reconnect attempts, in ms
Interval between Socket reconnect attempts, in ms
Interval between Channel rejoin attempts, in ms
Interval between Channel rejoin attempts, in ms
Interval between Channel rejoin attempts, in ms