PhoenixSocketOptions class
Options for the open Phoenix socket.
Provided durations are all in milliseconds.
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< dynamicParams()?, MessageSerializer? serializer})String, String> > -
Create a PhoenixSocketOptions
const
Properties
-
dynamicParams
→ (Future<
Map< Function()?)String, String> > -
Will be called to get fresh params before each connection attempt.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeat → Duration
-
Duration between heartbeats
no setter
-
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.
no setterinherited
- 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.
no setter
Methods
-
getParams(
) → Future< Map< String, String> > - Get connection params.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited