A data channel. More...
Public Member Functions | |
DataChannel (String label) | |
Initializes a new instance of the fm.liveswitch.DataChannel class. More... | |
DataChannel (String label, boolean ordered) | |
Initializes a new instance of the fm.liveswitch.DataChannel class. More... | |
DataChannel (String label, boolean ordered, String subprotocol) | |
Initializes a new instance of the fm.liveswitch.DataChannel class. More... | |
fm.liveswitch.Future< Object > | sendDataBytes (fm.liveswitch.DataBuffer dataBytes) |
Sends bytes. More... | |
fm.liveswitch.Future< Object > | sendDataString (String dataString) |
Sends a string. More... | |
Public Member Functions inherited from fm.liveswitch.DataChannelBase< fm.liveswitch.DataChannel > | |
void | addOnStateChange (fm.liveswitch.IAction1< TDataChannel > value) |
Adds a handler that is raised when the data channel state changes. More... | |
long | getBytesReceived () |
Gets the number of bytes received. More... | |
long | getBytesSent () |
Gets the number of bytes sent. More... | |
String | getConnectionId () |
Gets the connection identifier. More... | |
String | getId () |
Gets the identifier. More... | |
fm.liveswitch.DataChannelInfo | getInfo () |
Gets the data channel info. More... | |
boolean | getIsInternal () |
Gets a value indicating if this is an internal data channel. More... | |
boolean | getIsTerminated () |
Gets a value indicating whether the data channel is currently closed or failed. More... | |
boolean | getIsTerminating () |
Gets a value indicating whether the data channel is currently closing. More... | |
boolean | getIsTerminatingOrTerminated () |
Gets a value indicating whether the data channel is currently closing, closed, or failed. More... | |
String | getLabel () |
Gets the label. More... | |
long | getMessagesReceived () |
Gets the number of messages received. More... | |
long | getMessagesSent () |
Gets the number of messages sent. More... | |
fm.liveswitch.IAction1< fm.liveswitch.DataChannelReceiveArgs > | getOnReceive () |
Gets a callback invoked when a message is received. More... | |
boolean | getOrdered () |
Gets a value indicating whether messages will be delivered in the order they are sent. More... | |
fm.liveswitch.DataChannelState | getState () |
Gets the state. More... | |
String | getStreamId () |
Gets the stream identifier. More... | |
String | getSubprotocol () |
Gets the subprotocol. More... | |
void | removeOnStateChange (fm.liveswitch.IAction1< TDataChannel > value) |
Removes a handler that is raised when the data channel state changes. More... | |
abstract fm.liveswitch.Future< Object > | sendDataBytes (fm.liveswitch.DataBuffer dataBytes) |
Sends some bytes. More... | |
abstract fm.liveswitch.Future< Object > | sendDataString (String dataString) |
Sends a string. More... | |
void | setOnReceive (fm.liveswitch.IAction1< fm.liveswitch.DataChannelReceiveArgs > value) |
Sets a callback invoked when a message is received. More... | |
Protected Member Functions | |
fm.liveswitch.DataChannel | getInstance () |
Gets the current instance. More... | |
void | processStateLockChange () |
Processes a state lock change. More... | |
Protected Member Functions inherited from fm.liveswitch.DataChannelBase< fm.liveswitch.DataChannel > | |
DataChannelBase (String label, boolean ordered, String subprotocol) | |
Initializes a new instance of the fm.liveswitch.DataChannelBase class. More... | |
DataChannelBase (String label, boolean ordered, String subprotocol, boolean internalChannel) | |
Initializes a new instance of the fm.liveswitch.DataChannelBase class. More... | |
abstract TDataChannel | getInstance () |
Gets the current instance. More... | |
void | processStateChange () |
Processes a state change. More... | |
void | processStateLockChange () |
Processes a state lock change. More... | |
void | raiseDataBytes (fm.liveswitch.DataBuffer dataBytes) |
Raises the OnReceive callback with data bytes. More... | |
void | raiseDataString (String dataString) |
Raises the OnReceive callback with a data string. More... | |
void | registerDataReceived (int dataLength) |
Registers that a data has been sent. More... | |
void | registerDataSent (int dataLength) |
Registers that a data has been sent. More... | |
A data channel.
fm.liveswitch.DataChannel.DataChannel | ( | String | label | ) |
Initializes a new instance of the fm.liveswitch.DataChannel class.
label | The label. |
fm.liveswitch.DataChannel.DataChannel | ( | String | label, |
boolean | ordered | ||
) |
Initializes a new instance of the fm.liveswitch.DataChannel class.
label | The label. |
ordered | if set to true
|
fm.liveswitch.DataChannel.DataChannel | ( | String | label, |
boolean | ordered, | ||
String | subprotocol | ||
) |
Initializes a new instance of the fm.liveswitch.DataChannel class.
label | The label. |
ordered | Whether messages will be delivered in the order they are sent. |
subprotocol | The subprotocol. |
|
protected |
Gets the current instance.
|
protected |
Processes a state lock change.
fm.liveswitch.Future<Object> fm.liveswitch.DataChannel.sendDataBytes | ( | fm.liveswitch.DataBuffer | dataBytes | ) |
Sends bytes.
dataBytes | The data bytes. |
fm.liveswitch.Future<Object> fm.liveswitch.DataChannel.sendDataString | ( | String | dataString | ) |
Sends a string.
dataString | The data string. |