FMLiveSwitchWebSocket Class Reference

Implementation of the WebSocket protocol v8. More...

Instance Methods

(int) - bufferedAmount
 Gets the number of bytes buffered in the send queue. More...
 
(void) - close
 Closes the WebSocket connection. More...
 
(void) - closeWithCloseArgs:
 Closes the WebSocket connection. More...
 
(instancetype) - initWithRequestUrl:
 Creates a new FMLiveSwitchWebSocket. More...
 
(instancetype) - initWithRequestUrl:protocol:
 Creates a new FMLiveSwitchWebSocket. More...
 
(bool) - isOpen
 Gets a value indicating whether the WebSocket is connected. More...
 
(void) - openWithOpenArgs:
 Opens the WebSocket connection. More...
 
(NSString *) - protocol
 Gets the WebSocket protocol. More...
 
(bool) - secure
 Gets a value indicating whether the WebSocket is secure. More...
 
(void) - sendWithSendArgs:
 Sends a message to the WebSocket server. More...
 
- Instance Methods inherited from FMLiveSwitchWebSocketBase
(instancetype) - init
 
(void) - raiseCloseCompleteWithCloseArgs:statusCode:reason:
 Raises the close complete callback. More...
 
(void) - raiseOpenFailureWithOpenArgs:statusCode:exception:
 Raises the open failure callback. More...
 
(void) - raiseOpenSuccessWithOpenArgs:
 Raises the open success callback. More...
 
(void) - raiseReceiveWithOpenArgs:textMessage:binaryMessage:
 Raises the receive callback. More...
 
(void) - raiseStreamFailureWithOpenArgs:statusCode:exception:
 Raises the stream failure callback. More...
 

Class Methods

(bool) + exists
 Gets a value indicating whether WebSocket support exists on this platform. More...
 
(FMLiveSwitchWebSocket *) + webSocketWithRequestUrl:
 Creates a new FMLiveSwitchWebSocket. More...
 
(FMLiveSwitchWebSocket *) + webSocketWithRequestUrl:protocol:
 Creates a new FMLiveSwitchWebSocket. More...
 
- Class Methods inherited from FMLiveSwitchWebSocketBase
(FMLiveSwitchWebSocketBase *) + webSocketBase
 

Detailed Description

Implementation of the WebSocket protocol v8.

Method Documentation

◆ bufferedAmount

- (int) bufferedAmount

Gets the number of bytes buffered in the send queue.

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ close

- (void) close

Closes the WebSocket connection.

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ closeWithCloseArgs:

- (void) closeWithCloseArgs: (FMLiveSwitchWebSocketCloseArgs *)  closeArgs

Closes the WebSocket connection.

Parameters
closeArgsThe close arguments

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ exists

+ (bool) exists

Gets a value indicating whether WebSocket support exists on this platform.

◆ initWithRequestUrl:

- (instancetype) initWithRequestUrl: (NSString *)  requestUrl

Creates a new FMLiveSwitchWebSocket.

Parameters
requestUrlThe target URL for the WebSocket connection.

◆ initWithRequestUrl:protocol:

- (instancetype) initWithRequestUrl: (NSString *)  requestUrl
protocol: (NSString *)  protocol 

Creates a new FMLiveSwitchWebSocket.

Parameters
requestUrlThe target URL for the WebSocket connection.
protocolThe WebSocket protocol.

◆ isOpen

- (bool) isOpen

Gets a value indicating whether the WebSocket is connected.

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ openWithOpenArgs:

- (void) openWithOpenArgs: (FMLiveSwitchWebSocketOpenArgs *)  openArgs

Opens the WebSocket connection.

Parameters
openArgsThe open arguments.

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ protocol

- (NSString*) protocol

Gets the WebSocket protocol.

◆ secure

- (bool) secure

Gets a value indicating whether the WebSocket is secure.

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ sendWithSendArgs:

- (void) sendWithSendArgs: (FMLiveSwitchWebSocketSendArgs *)  sendArgs

Sends a message to the WebSocket server.

Parameters
sendArgsThe send arguments.

Reimplemented from <FMLiveSwitchIWebSocket>.

◆ webSocketWithRequestUrl:

+ (FMLiveSwitchWebSocket*) webSocketWithRequestUrl: (NSString *)  requestUrl

Creates a new FMLiveSwitchWebSocket.

Parameters
requestUrlThe target URL for the WebSocket connection.

◆ webSocketWithRequestUrl:protocol:

+ (FMLiveSwitchWebSocket*) webSocketWithRequestUrl: (NSString *)  requestUrl
protocol: (NSString *)  protocol 

Creates a new FMLiveSwitchWebSocket.

Parameters
requestUrlThe target URL for the WebSocket connection.
protocolThe WebSocket protocol.