FMLiveSwitchDataChannel Class Reference

A data channel. More...

Instance Methods

(instancetype) - initWithLabel:
 Initializes a new instance of the FMLiveSwitchDataChannel class. More...
 
(instancetype) - initWithLabel:ordered:
 Initializes a new instance of the FMLiveSwitchDataChannel class. More...
 
(instancetype) - initWithLabel:ordered:subprotocol:
 Initializes a new instance of the FMLiveSwitchDataChannel class. More...
 
(FMLiveSwitchDataChannel *) - instance
 Gets the current instance. More...
 
(void) - processStateLockChange
 Processes a state lock change. More...
 
(FMLiveSwitchFuture< id > *) - sendDataBytes:
 Sends bytes. More...
 
(FMLiveSwitchFuture< id > *) - sendDataString:
 Sends a string. More...
 
- Instance Methods inherited from FMLiveSwitchDataChannelBase
(TDataChannel) - addOnStateChangeWithBlock
 Adds a handler that is raised when the data channel state changes. More...
 
(void) - addOnStateChangeWithBlock:
 Adds a handler that is raised when the data channel state changes. More...
 
(long long) - bytesReceived
 Gets the number of bytes received. More...
 
(long long) - bytesSent
 Gets the number of bytes sent. More...
 
(NSString *) - connectionId
 Gets the connection identifier. More...
 
(NSString *) - id
 Gets the identifier. More...
 
(FMLiveSwitchDataChannelInfo *) - info
 Gets the data channel info. More...
 
(instancetype) - initWithLabel:ordered:subprotocol:internalChannel:
 Initializes a new instance of the FMLiveSwitchDataChannelBase`1 class. More...
 
(bool) - isInternal
 Gets a value indicating if this is an internal data channel. More...
 
(bool) - isTerminated
 Gets a value indicating whether the data channel is currently closed or failed. More...
 
(bool) - isTerminating
 Gets a value indicating whether the data channel is currently closing. More...
 
(bool) - isTerminatingOrTerminated
 Gets a value indicating whether the data channel is currently closing, closed, or failed. More...
 
(NSString *) - label
 Gets the label. More...
 
(long long) - messagesReceived
 Gets the number of messages received. More...
 
(long long) - messagesSent
 Gets the number of messages sent. More...
 
(FMLiveSwitchAction1< FMLiveSwitchDataChannelReceiveArgs * > *) - onReceive
 Gets a callback invoked when a message is received. More...
 
(bool) - ordered
 Gets a value indicating whether messages will be delivered in the order they are sent. More...
 
(void) - processStateChange
 Processes a state change. More...
 
(void) - raiseDataBytes:
 Raises the OnReceive callback with data bytes. More...
 
(void) - raiseDataString:
 Raises the OnReceive callback with a data string. More...
 
(void) - registerDataReceivedWithDataLength:
 Registers that a data has been sent. More...
 
(void) - registerDataSentWithDataLength:
 Registers that a data has been sent. More...
 
(void) - removeOnStateChange:
 Removes a handler that is raised when the data channel state changes. More...
 
(void) - setOnReceive:
 Sets a callback invoked when a message is received. More...
 
(FMLiveSwitchDataChannelReceiveArgs *) - setOnReceiveBlock
 Sets a callback invoked when a message is received. More...
 
(void) - setOnReceiveBlock:
 Sets a callback invoked when a message is received. More...
 
(FMLiveSwitchDataChannelState) - state
 Gets the state. More...
 
(NSString *) - streamId
 Gets the stream identifier. More...
 
(NSString *) - subprotocol
 Gets the subprotocol. More...
 

Class Methods

(FMLiveSwitchDataChannel *) + dataChannelWithLabel:
 Initializes a new instance of the FMLiveSwitchDataChannel class. More...
 
(FMLiveSwitchDataChannel *) + dataChannelWithLabel:ordered:
 Initializes a new instance of the FMLiveSwitchDataChannel class. More...
 
(FMLiveSwitchDataChannel *) + dataChannelWithLabel:ordered:subprotocol:
 Initializes a new instance of the FMLiveSwitchDataChannel class. More...
 
- Class Methods inherited from FMLiveSwitchDataChannelBase
(FMLiveSwitchDataChannelBase *) + dataChannelBaseWithLabel:ordered:subprotocol:
 Initializes a new instance of the FMLiveSwitchDataChannelBase`1 class. More...
 
(FMLiveSwitchDataChannelBase *) + dataChannelBaseWithLabel:ordered:subprotocol:internalChannel:
 Initializes a new instance of the FMLiveSwitchDataChannelBase`1 class. More...
 

Additional Inherited Members

- Protected Attributes inherited from FMLiveSwitchDataChannelBase
 __pad0__: FMLiveSwitchDynamic<FMLiveSwitchIDataChannel>- (void) addOnStateChange:(FMLiveSwitchAction1<TDataChannel>*)value
 

Detailed Description

A data channel.

Method Documentation

◆ dataChannelWithLabel:

+ (FMLiveSwitchDataChannel*) dataChannelWithLabel: (NSString *)  label

Initializes a new instance of the FMLiveSwitchDataChannel class.

Parameters
labelThe label.

◆ dataChannelWithLabel:ordered:

+ (FMLiveSwitchDataChannel*) dataChannelWithLabel: (NSString *)  label
ordered: (bool)  ordered 

Initializes a new instance of the FMLiveSwitchDataChannel class.

Parameters
labelThe label.
orderedif set to true [ordered].

◆ dataChannelWithLabel:ordered:subprotocol:

+ (FMLiveSwitchDataChannel*) dataChannelWithLabel: (NSString *)  label
ordered: (bool)  ordered
subprotocol: (NSString *)  subprotocol 

Initializes a new instance of the FMLiveSwitchDataChannel class.

Parameters
labelThe label.
orderedWhether messages will be delivered in the order they are sent.
subprotocolThe subprotocol.

◆ initWithLabel:

- (instancetype) initWithLabel: (NSString *)  label

Initializes a new instance of the FMLiveSwitchDataChannel class.

Parameters
labelThe label.

◆ initWithLabel:ordered:

- (instancetype) initWithLabel: (NSString *)  label
ordered: (bool)  ordered 

Initializes a new instance of the FMLiveSwitchDataChannel class.

Parameters
labelThe label.
orderedif set to true [ordered].

◆ initWithLabel:ordered:subprotocol:

- (instancetype) initWithLabel: (NSString *)  label
ordered: (bool)  ordered
subprotocol: (NSString *)  subprotocol 

Initializes a new instance of the FMLiveSwitchDataChannel class.

Parameters
labelThe label.
orderedWhether messages will be delivered in the order they are sent.
subprotocolThe subprotocol.

Implements FMLiveSwitchDataChannelBase.

◆ instance

- (FMLiveSwitchDataChannel*) instance

Gets the current instance.

Implements FMLiveSwitchDataChannelBase.

◆ processStateLockChange

- (void) processStateLockChange

Processes a state lock change.

Implements FMLiveSwitchDataChannelBase.

◆ sendDataBytes:

- (FMLiveSwitchFuture<id>*) sendDataBytes: (FMLiveSwitchDataBuffer *)  dataBytes

Sends bytes.

Parameters
dataBytesThe data bytes.

Implements FMLiveSwitchDataChannelBase.

◆ sendDataString:

- (FMLiveSwitchFuture<id>*) sendDataString: (NSString *)  dataString

Sends a string.

Parameters
dataStringThe data string.

Implements FMLiveSwitchDataChannelBase.