Socket
A Socket which connects to a Phoenix Server. 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
Default OkHttpClient to connect with. You can provide your own if needed.
Constructors
A Socket which connects to a Phoenix Server. Takes a constant parameter to be sent to the server when connecting. Defaults to null if excluded.
Properties
The fully qualified socket URL
Interval between sending a heartbeat, in ms
Interval between socket reconnect attempts, in ms
Interval between channel rejoin attempts, in ms
Disables heartbeats from being sent. Default is false.