PhoenixSocketOptions class Null safety

Options for the open Phoenix socket.

Provided durations are all in milliseconds.

Annotations

Constructors

PhoenixSocketOptions({Duration? timeout, Duration? heartbeat, List<Duration> reconnectDelays = const [Duration.zero, Duration(milliseconds: 1000), Duration(milliseconds: 2000), Duration(milliseconds: 4000), Duration(milliseconds: 8000), Duration(milliseconds: 16000), Duration(milliseconds: 32000)], Map<String, String>? params, Future<Map<String, String>> dynamicParams()?, MessageSerializer? serializer})
Create a PhoenixSocketOptions

Properties

dynamicParams → (Future<Map<String, String>> Function?()?)
Will be called to get fresh params before each connection attempt.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
heartbeat Duration
Duration between heartbeats
read-only
params Map<String, String>?
Parameters sent to your Phoenix backend on connection. Use dynamicParams if your params are dynamic.
final
reconnectDelays List<Duration>
Optional list of Duration between reconnect attempts
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serializer → MessageSerializer
The serializer used to serialize and deserialize messages on applicable sockets.
final
timeout Duration
Duration after which a request is assumed to have timed out.
read-only

Methods

getParams() Future<Map<String, String>>
Get connection params.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited