<FMLiveSwitchIDataChannel> Protocol Reference

Data channel interface. More...

Instance Methods

(void) - addOnStateChange:
 Adds a handler that is raised when the state changes. More...
 
(id- addOnStateChangeWithBlock
 Adds a handler that is raised when the state changes. More...
 
(void) - addOnStateChangeWithBlock:
 Adds a handler that is raised when the state changes. More...
 
(NSString *) - id
 Gets the data channel identifier. More...
 
(FMLiveSwitchDataChannelInfo *) - info
 Gets the data channel info. More...
 
(bool) - isInternal
 Gets a value indicating if this is an internal data channel. More...
 
(NSString *) - label
 Gets the label. More...
 
(FMLiveSwitchAction1 *) - onReceive
 Gets the callback to execute 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) - removeOnStateChange:
 Removes a handler that is raised when the state changes. More...
 
(FMLiveSwitchFuture *) - sendDataBytes:
 Sends a byte array. More...
 
(FMLiveSwitchFuture *) - sendDataString:
 Sends a string. More...
 
(void) - setOnReceive:
 Sets the callback to execute when a message is received. More...
 
(FMLiveSwitchDataChannelReceiveArgs *) - setOnReceiveBlock
 Sets the callback to execute when a message is received. More...
 
(void) - setOnReceiveBlock:
 Sets the callback to execute when a message is received. More...
 
(FMLiveSwitchDataChannelState) - state
 Gets the state. More...
 
(NSString *) - subprotocol
 Gets the subprotocol. More...
 

Detailed Description

Data channel interface.

Method Documentation

◆ addOnStateChange:

- (void) addOnStateChange: (FMLiveSwitchAction1 *)  value

Adds a handler that is raised when the state changes.

◆ addOnStateChangeWithBlock

- (id) addOnStateChangeWithBlock

Adds a handler that is raised when the state changes.

◆ addOnStateChangeWithBlock:

- (void) addOnStateChangeWithBlock: (void(^)(id))  valueBlock

Adds a handler that is raised when the state changes.

◆ id

- (NSString*) id

Gets the data channel identifier.

◆ info

Gets the data channel info.

◆ isInternal

- (bool) isInternal

Gets a value indicating if this is an internal data channel.

◆ label

- (NSString*) label

Gets the label.

◆ onReceive

- (FMLiveSwitchAction1*) onReceive

Gets the callback to execute when a message is received.

◆ ordered

- (bool) ordered

Gets a value indicating whether messages will be delivered in the order they are sent.

◆ removeOnStateChange:

- (void) removeOnStateChange: (FMLiveSwitchAction1 *)  value

Removes a handler that is raised when the state changes.

◆ sendDataBytes:

- (FMLiveSwitchFuture*) sendDataBytes: (FMLiveSwitchDataBuffer *)  dataBytes

Sends a byte array.

◆ sendDataString:

- (FMLiveSwitchFuture*) sendDataString: (NSString *)  dataString

Sends a string.

◆ setOnReceive:

- (void) setOnReceive: (FMLiveSwitchAction1 *)  value

Sets the callback to execute when a message is received.

◆ setOnReceiveBlock

- (FMLiveSwitchDataChannelReceiveArgs*) setOnReceiveBlock

Sets the callback to execute when a message is received.

◆ setOnReceiveBlock:

- (void) setOnReceiveBlock: (void(^)(FMLiveSwitchDataChannelReceiveArgs *))  valueBlock

Sets the callback to execute when a message is received.

◆ state

- (FMLiveSwitchDataChannelState) state

Gets the state.

◆ subprotocol

- (NSString*) subprotocol

Gets the subprotocol.