Class StreamHub.ConnectionListener
This interface should be implemented by classes wanting to receive notifications when the connection to the StreamHub server is lost or established.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a new ConnectionListener
|
| Method Attributes | Method Name and Description |
|---|---|
|
This method is called everytime a connection is established with the StreamHub server
|
|
|
This method is called everytime the connection to the StreamHub server is lost
|
Class Detail
StreamHub.ConnectionListener()
Creates a new ConnectionListener
// Example - implementing a connection listener
var connectionListener = new StreamHub.ConnectionListener();
connectionListener.onConnectionEstablished = function () {
alert("Connection up");
};
connectionListener.onConnectionLost = function () {
alert("Connection down");
};
Method Detail
onConnectionEstablished()
This method is called everytime a connection is established with the StreamHub server
onConnectionLost()
This method is called everytime the connection to the StreamHub server is lost