PusherConnector class

Inheritance

Constructors

PusherConnector(String key, {required String authEndPoint, Map<String, String> authHeaders = const {'Content-Type' : 'application/json'}, String? cluster, String host = "ws.pusherapp.com", int wsPort = 80, int wssPort = 443, bool encrypted = true, int activityTimeout = 120000, int pongTimeout = 30000, int maxReconnectionAttempts = 6, int maxReconnectGapInSeconds = 30, bool enableLogging = true, bool autoConnect = true, String? nameSpace})

Properties

channels Map<String, PusherChannel>
All of the subscribed channel names.
getter/setter pairinherited
client → PusherClient
getting client
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
options ConnectorOptions<PusherClient>
Connector options.
getter/setter pairinherited
pusher → PusherClient
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socketId String?
Get the socket ID for the connection.
no setteroverride

Methods

channel(String name) PusherChannel
Get a channel instance by name.
override
connect() → void
Create a fresh Pusher connection.
override
disconnect() → void
Disconnect Pusher connection.
override
encryptedPrivateChannel(String name) → PusherEncryptedPrivateChannel
Get a private encrypted channel instance by name.
override
leave(String name) → void
Leave the given channel, as well as its private and presence variants.
override
leaveChannel(String name) → void
Leave the given channel.
override
listen(String name, String event, Function callback) PusherChannel
Listen for an event on a channel instance.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onConnect(dynamic handler(dynamic data)) → void
listen to on connect event
inherited
onConnectError(dynamic handler(dynamic data)) → void
listen to on connect error event
override
onConnecting(dynamic handler(dynamic data)) → void
listen to on connecting event
inherited
onConnectTimeout(dynamic handler(dynamic data)) → void
listen to on connect timeout event
inherited
onDisconnect(dynamic handler(dynamic data)) → void
listen to on disconnect event
inherited
onError(dynamic handler(dynamic data)) → void
listen to on error event
inherited
onReconnect(dynamic handler(dynamic data)) → void
listen to on reconnected event
inherited
onReconnectAttempt(dynamic handler(dynamic data)) → void
listen to on reconnect attempt event
inherited
onReconnectError(dynamic handler(dynamic data)) → void
listen to on reconnect error event
inherited
onReconnectFailed(dynamic handler(dynamic data)) → void
listen to on reconnect failed event
inherited
onReconnecting(dynamic handler(dynamic data)) → void
listen to on reconnecting event
inherited
presenceChannel(String name) PusherPresenceChannel
Get a presence channel instance by name.
override
privateChannel(String name) → PusherPrivateChannel
Get a private channel instance by name.
override
toString() String
A string representation of this object.
inherited

Operators

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