FMLiveSwitchWebSocketTransfer Class Reference

Base class that defines methods for transferring content over the WebSocket protocol. More...

Instance Methods

(int) - handshakeTimeout
 Gets the timeout for the initial handshake (in ms). More...
 
(instancetype) - initWithUrl:
 Initializes a new instance of the FMLiveSwitchWebSocketTransfer class. More...
 
(FMLiveSwitchAction1< FMLiveSwitchWebSocketOpenFailureArgs * > *) - onOpenFailure
 Gets the callback to invoke if the handshake fails. More...
 
(FMLiveSwitchAction1< FMLiveSwitchWebSocketOpenSuccessArgs * > *) - onOpenSuccess
 Gets the callback to invoke if the handshake succeeds. More...
 
(FMLiveSwitchAction1< FMLiveSwitchHttpRequestCreatedArgs * > *) - onRequestCreated
 Gets the callback to invoke when the handshake request is created. More...
 
(FMLiveSwitchAction1< FMLiveSwitchHttpResponseReceivedArgs * > *) - onResponseReceived
 Gets the callback to invoke when the handshake response is received. More...
 
(FMLiveSwitchAction1< FMLiveSwitchWebSocketStreamFailureArgs * > *) - onStreamFailure
 Gets the callback to invoke if the stream errors out. More...
 
(void) - openWithHeaders:
 Opens the socket. More...
 
(void) - sendAsyncWithRequestArgs:callback:
 Sends a request asynchronously. More...
 
(void) - sendAsyncWithRequestArgs:callbackBlock:
 Sends a request asynchronously. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendAsyncWithRequestArgsAndCallbackBlock
 Sends a request asynchronously. More...
 
(id- sender
 Gets the sender of the messages. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendWithRequestArgs:
 Sends a request synchronously. More...
 
(void) - setHandshakeTimeout:
 Sets the timeout for the initial handshake (in ms). More...
 
(void) - setOnOpenFailure:
 Sets the callback to invoke if the handshake fails. More...
 
(FMLiveSwitchWebSocketOpenFailureArgs *) - setOnOpenFailureBlock
 Sets the callback to invoke if the handshake fails. More...
 
(void) - setOnOpenFailureBlock:
 Sets the callback to invoke if the handshake fails. More...
 
(void) - setOnOpenSuccess:
 Sets the callback to invoke if the handshake succeeds. More...
 
(FMLiveSwitchWebSocketOpenSuccessArgs *) - setOnOpenSuccessBlock
 Sets the callback to invoke if the handshake succeeds. More...
 
(void) - setOnOpenSuccessBlock:
 Sets the callback to invoke if the handshake succeeds. More...
 
(void) - setOnRequestCreated:
 Sets the callback to invoke when the handshake request is created. More...
 
(FMLiveSwitchHttpRequestCreatedArgs *) - setOnRequestCreatedBlock
 Sets the callback to invoke when the handshake request is created. More...
 
(void) - setOnRequestCreatedBlock:
 Sets the callback to invoke when the handshake request is created. More...
 
(void) - setOnResponseReceived:
 Sets the callback to invoke when the handshake response is received. More...
 
(FMLiveSwitchHttpResponseReceivedArgs *) - setOnResponseReceivedBlock
 Sets the callback to invoke when the handshake response is received. More...
 
(void) - setOnResponseReceivedBlock:
 Sets the callback to invoke when the handshake response is received. More...
 
(void) - setOnStreamFailure:
 Sets the callback to invoke if the stream errors out. More...
 
(FMLiveSwitchWebSocketStreamFailureArgs *) - setOnStreamFailureBlock
 Sets the callback to invoke if the stream errors out. More...
 
(void) - setOnStreamFailureBlock:
 Sets the callback to invoke if the stream errors out. More...
 
(void) - setSender:
 Sets the sender of the messages. More...
 
(void) - setStreamTimeout:
 Sets the timeout for the stream (in ms). More...
 
(void) - setUrl:
 Sets the URL. More...
 
(void) - shutdown
 Releases any resources and shuts down. More...
 
(int) - streamTimeout
 Gets the timeout for the stream (in ms). More...
 
(NSString *) - url
 Gets the URL. More...
 

Class Methods

(FMLiveSwitchWebSocketTransfer *) + webSocketTransferWithUrl:
 Initializes a new instance of the FMLiveSwitchWebSocketTransfer class. More...
 

Detailed Description

Base class that defines methods for transferring content over the WebSocket protocol.

Method Documentation

◆ handshakeTimeout

- (int) handshakeTimeout

Gets the timeout for the initial handshake (in ms).

◆ initWithUrl:

- (instancetype) initWithUrl: (NSString *)  url

Initializes a new instance of the FMLiveSwitchWebSocketTransfer class.

Parameters
urlThe URL.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ onOpenFailure

- (FMLiveSwitchAction1<FMLiveSwitchWebSocketOpenFailureArgs*>*) onOpenFailure

Gets the callback to invoke if the handshake fails.

◆ onOpenSuccess

- (FMLiveSwitchAction1<FMLiveSwitchWebSocketOpenSuccessArgs*>*) onOpenSuccess

Gets the callback to invoke if the handshake succeeds.

◆ onRequestCreated

- (FMLiveSwitchAction1<FMLiveSwitchHttpRequestCreatedArgs*>*) onRequestCreated

Gets the callback to invoke when the handshake request is created.

◆ onResponseReceived

- (FMLiveSwitchAction1<FMLiveSwitchHttpResponseReceivedArgs*>*) onResponseReceived

Gets the callback to invoke when the handshake response is received.

◆ onStreamFailure

- (FMLiveSwitchAction1<FMLiveSwitchWebSocketStreamFailureArgs*>*) onStreamFailure

Gets the callback to invoke if the stream errors out.

◆ openWithHeaders:

- (void) openWithHeaders: (FMLiveSwitchNameValueCollection *)  headers

Opens the socket.

Parameters
headersThe headers to pass in with the initial handshake.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ sendAsyncWithRequestArgs:callback:

- (void) sendAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callback: (FMLiveSwitchAction1< FMLiveSwitchHttpResponseArgs * > *)  callback 

Sends a request asynchronously.

Parameters
requestArgsThe request parameters.
callbackThe callback to execute with the resulting response.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ sendAsyncWithRequestArgs:callbackBlock:

- (void) sendAsyncWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs
callbackBlock: (void(^)(FMLiveSwitchHttpResponseArgs *))  callbackBlock 

Sends a request asynchronously.

Parameters
requestArgsThe request parameters.
callbackBlockThe callback to execute with the resulting response.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ sendAsyncWithRequestArgsAndCallbackBlock

- (FMLiveSwitchHttpResponseArgs*) sendAsyncWithRequestArgsAndCallbackBlock

Sends a request asynchronously.

@inlineparam requestArgs The request parameters. @inlineparam callbackBlock The callback to execute with the resulting response.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ sender

- (id) sender

Gets the sender of the messages.

◆ sendWithRequestArgs:

- (FMLiveSwitchHttpResponseArgs*) sendWithRequestArgs: (FMLiveSwitchHttpRequestArgs *)  requestArgs

Sends a request synchronously.

Parameters
requestArgsThe request parameters.
Returns
The response parameters.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ setHandshakeTimeout:

- (void) setHandshakeTimeout: (int)  value

Sets the timeout for the initial handshake (in ms).

◆ setOnOpenFailure:

- (void) setOnOpenFailure: (FMLiveSwitchAction1< FMLiveSwitchWebSocketOpenFailureArgs * > *)  value

Sets the callback to invoke if the handshake fails.

◆ setOnOpenFailureBlock

- (FMLiveSwitchWebSocketOpenFailureArgs*) setOnOpenFailureBlock

Sets the callback to invoke if the handshake fails.

◆ setOnOpenFailureBlock:

- (void) setOnOpenFailureBlock: (void(^)(FMLiveSwitchWebSocketOpenFailureArgs *))  valueBlock

Sets the callback to invoke if the handshake fails.

◆ setOnOpenSuccess:

- (void) setOnOpenSuccess: (FMLiveSwitchAction1< FMLiveSwitchWebSocketOpenSuccessArgs * > *)  value

Sets the callback to invoke if the handshake succeeds.

◆ setOnOpenSuccessBlock

- (FMLiveSwitchWebSocketOpenSuccessArgs*) setOnOpenSuccessBlock

Sets the callback to invoke if the handshake succeeds.

◆ setOnOpenSuccessBlock:

- (void) setOnOpenSuccessBlock: (void(^)(FMLiveSwitchWebSocketOpenSuccessArgs *))  valueBlock

Sets the callback to invoke if the handshake succeeds.

◆ setOnRequestCreated:

- (void) setOnRequestCreated: (FMLiveSwitchAction1< FMLiveSwitchHttpRequestCreatedArgs * > *)  value

Sets the callback to invoke when the handshake request is created.

◆ setOnRequestCreatedBlock

- (FMLiveSwitchHttpRequestCreatedArgs*) setOnRequestCreatedBlock

Sets the callback to invoke when the handshake request is created.

◆ setOnRequestCreatedBlock:

- (void) setOnRequestCreatedBlock: (void(^)(FMLiveSwitchHttpRequestCreatedArgs *))  valueBlock

Sets the callback to invoke when the handshake request is created.

◆ setOnResponseReceived:

- (void) setOnResponseReceived: (FMLiveSwitchAction1< FMLiveSwitchHttpResponseReceivedArgs * > *)  value

Sets the callback to invoke when the handshake response is received.

◆ setOnResponseReceivedBlock

- (FMLiveSwitchHttpResponseReceivedArgs*) setOnResponseReceivedBlock

Sets the callback to invoke when the handshake response is received.

◆ setOnResponseReceivedBlock:

- (void) setOnResponseReceivedBlock: (void(^)(FMLiveSwitchHttpResponseReceivedArgs *))  valueBlock

Sets the callback to invoke when the handshake response is received.

◆ setOnStreamFailure:

- (void) setOnStreamFailure: (FMLiveSwitchAction1< FMLiveSwitchWebSocketStreamFailureArgs * > *)  value

Sets the callback to invoke if the stream errors out.

◆ setOnStreamFailureBlock

- (FMLiveSwitchWebSocketStreamFailureArgs*) setOnStreamFailureBlock

Sets the callback to invoke if the stream errors out.

◆ setOnStreamFailureBlock:

- (void) setOnStreamFailureBlock: (void(^)(FMLiveSwitchWebSocketStreamFailureArgs *))  valueBlock

Sets the callback to invoke if the stream errors out.

◆ setSender:

- (void) setSender: (id value

Sets the sender of the messages.

◆ setStreamTimeout:

- (void) setStreamTimeout: (int)  value

Sets the timeout for the stream (in ms).

◆ setUrl:

- (void) setUrl: (NSString *)  value

Sets the URL.

◆ shutdown

- (void) shutdown

Releases any resources and shuts down.

Implemented in FMLiveSwitchWebSocketWebRequestTransfer.

◆ streamTimeout

- (int) streamTimeout

Gets the timeout for the stream (in ms).

◆ url

- (NSString*) url

Gets the URL.

◆ webSocketTransferWithUrl:

+ (FMLiveSwitchWebSocketTransfer*) webSocketTransferWithUrl: (NSString *)  url

Initializes a new instance of the FMLiveSwitchWebSocketTransfer class.

Parameters
urlThe URL.