public interface Connection
Modifier and Type | Method and Description |
---|---|
void |
bind(ConnectionState state,
ConnectionEventListener eventListener)
Bind to connection events.
|
void |
connect()
No need to call this via the API.
|
String |
getSocketId()
Gets a unique connection ID.
|
ConnectionState |
getState()
Gets the current connection state.
|
boolean |
unbind(ConnectionState state,
ConnectionEventListener eventListener)
Unbind from connection state changes.
|
void connect()
Pusher.connect()
.void bind(ConnectionState state, ConnectionEventListener eventListener)
state
- The states to bind to.eventListener
- A listener to be called when the state changes.boolean unbind(ConnectionState state, ConnectionEventListener eventListener)
state
- The state to unbind from.eventListener
- The listener to be unbound.true
if the unbind was successful, otherwise
false
.ConnectionState getState()
String getSocketId()
Copyright © 2017 Pusher. All rights reserved.