FMLiveSwitchWebSocketWebRequestTransfer Class Reference

Defines methods for transferring messages using the WebSocket protocol. More...

Instance Methods

(instancetype) - initWithUrl:
 Creates a new instance of FMLiveSwitchWebSocketWebRequestTransfer. More...
 
(void) - openWithHeaders:
 Opens the WebSocket connection. More...
 
(void) - sendAsyncWithRequestArgs:callback:
 Sends a request asynchronously. More...
 
(void) - sendAsyncWithRequestArgs:callbackBlock:
 Sends a request asynchronously. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendAsyncWithRequestArgsAndCallbackBlock
 Sends a request asynchronously. More...
 
(FMLiveSwitchHttpResponseArgs *) - sendWithRequestArgs:
 Sends a request synchronously. More...
 
(void) - shutdown
 Releases any resources and shuts down. More...
 
- Instance Methods inherited from FMLiveSwitchWebSocketTransfer
(int) - handshakeTimeout
 Gets the timeout for the initial handshake (in ms). 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...
 
(id- sender
 Gets the sender of the messages. 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...
 
(int) - streamTimeout
 Gets the timeout for the stream (in ms). More...
 
(NSString *) - url
 Gets the URL. More...
 

Class Methods

(FMLiveSwitchWebSocketWebRequestTransfer *) + webSocketWebRequestTransferWithUrl:
 Creates a new instance of FMLiveSwitchWebSocketWebRequestTransfer. More...
 
- Class Methods inherited from FMLiveSwitchWebSocketTransfer
(FMLiveSwitchWebSocketTransfer *) + webSocketTransferWithUrl:
 Initializes a new instance of the FMLiveSwitchWebSocketTransfer class. More...
 

Detailed Description

Defines methods for transferring messages using the WebSocket protocol.

Method Documentation

◆ initWithUrl:

- (instancetype) initWithUrl: (NSString *)  url

Creates a new instance of FMLiveSwitchWebSocketWebRequestTransfer.

Parameters
urlThe URL.

Implements FMLiveSwitchWebSocketTransfer.

◆ openWithHeaders:

- (void) openWithHeaders: (FMLiveSwitchNameValueCollection *)  headers

Opens the WebSocket connection.

Implements FMLiveSwitchWebSocketTransfer.

◆ 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.

Implements FMLiveSwitchWebSocketTransfer.

◆ 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.

Implements FMLiveSwitchWebSocketTransfer.

◆ sendAsyncWithRequestArgsAndCallbackBlock

- (FMLiveSwitchHttpResponseArgs*) sendAsyncWithRequestArgsAndCallbackBlock

Sends a request asynchronously.

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

Implements FMLiveSwitchWebSocketTransfer.

◆ sendWithRequestArgs:

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

Sends a request synchronously.

Parameters
requestArgsThe request parameters.
Returns
The response parameters.

Implements FMLiveSwitchWebSocketTransfer.

◆ shutdown

- (void) shutdown

Releases any resources and shuts down.

Implements FMLiveSwitchWebSocketTransfer.

◆ webSocketWebRequestTransferWithUrl:

+ (FMLiveSwitchWebSocketWebRequestTransfer*) webSocketWebRequestTransferWithUrl: (NSString *)  url

Creates a new instance of FMLiveSwitchWebSocketWebRequestTransfer.

Parameters
urlThe URL.