FMWebSocketTransfer Class Reference

Inherits from NSObject
Declared in FM.h

Overview

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

– handshakeTimeout

Gets the timeout for the initial handshake.

- (int)handshakeTimeout

Discussion

Gets the timeout for the initial handshake.

Declared In

FM.h

– initWithUrl:

Initializes a new instance of the class.

- (id)initWithUrl:(NSString *)url

Parameters

name="url">The

URL.

Discussion

Initializes a new instance of the class.

Declared In

FM.h

– onOpenFailure

Gets the callback to invoke if the handshake fails.

- (FMCallback *)onOpenFailure

Discussion

Gets the callback to invoke if the handshake fails.

Declared In

FM.h

– onOpenSuccess

Gets the callback to invoke if the handshake succeeds.

- (FMCallback *)onOpenSuccess

Discussion

Gets the callback to invoke if the handshake succeeds.

Declared In

FM.h

– onRequestCreated

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

- (FMCallback *)onRequestCreated

Discussion

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

Declared In

FM.h

– onResponseReceived

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

- (FMCallback *)onResponseReceived

Discussion

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

Declared In

FM.h

– onStreamFailure

Gets the callback to invoke if the stream errors out.

- (FMCallback *)onStreamFailure

Discussion

Gets the callback to invoke if the stream errors out.

Declared In

FM.h

– openWithHeaders:

Opens the socket.

- (void)openWithHeaders:(FMNameValueCollection *)headers

Parameters

name="headers">The

headers to pass in with the initial handshake.

Discussion

Opens the socket.

Declared In

FM.h

– sendAsyncWithRequestArgs:callback:

Sends a request asynchronously.

- (void)sendAsyncWithRequestArgs:(FMHttpRequestArgs *)requestArgs callback:(FMCallback *)callback

Parameters

name="requestArgs">The

request parameters.

name="callback">The

callback to execute with the resulting response.

Discussion

Sends a request asynchronously.

Declared In

FM.h

– sendAsyncWithRequestArgs:callbackBlock:

Sends a request asynchronously.

- (void)sendAsyncWithRequestArgs:(FMHttpRequestArgs *)requestArgs callbackBlock:(void ( ^ ) ( FMHttpResponseArgs *))callbackBlock

Parameters

name="requestArgs">The

request parameters.

name="callback">The

callback to execute with the resulting response.

Discussion

Sends a request asynchronously.

Declared In

FM.h

– sender

Gets the sender of the messages.

- (NSObject *)sender

Discussion

Gets the sender of the messages.

Declared In

FM.h

– sendWithRequestArgs:

Sends a request synchronously.

- (FMHttpResponseArgs *)sendWithRequestArgs:(FMHttpRequestArgs *)requestArgs

Parameters

name="requestArgs">The

request parameters. The response parameters.

Discussion

Sends a request synchronously.

Declared In

FM.h

– setHandshakeTimeout:

Sets the timeout for the initial handshake.

- (void)setHandshakeTimeout:(int)value

Discussion

Sets the timeout for the initial handshake.

Declared In

FM.h

– setOnOpenFailure:

Sets the callback to invoke if the handshake fails.

- (void)setOnOpenFailure:(FMCallback *)value

Discussion

Sets the callback to invoke if the handshake fails.

Declared In

FM.h

– setOnOpenFailureBlock:

Sets the callback to invoke if the handshake fails.

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

Discussion

Sets the callback to invoke if the handshake fails.

Declared In

FM.h

– setOnOpenSuccess:

Sets the callback to invoke if the handshake succeeds.

- (void)setOnOpenSuccess:(FMCallback *)value

Discussion

Sets the callback to invoke if the handshake succeeds.

Declared In

FM.h

– setOnOpenSuccessBlock:

Sets the callback to invoke if the handshake succeeds.

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

Discussion

Sets the callback to invoke if the handshake succeeds.

Declared In

FM.h

– setOnRequestCreated:

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

- (void)setOnRequestCreated:(FMCallback *)value

Discussion

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

Declared In

FM.h

– setOnRequestCreatedBlock:

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

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

Discussion

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

Declared In

FM.h

– setOnResponseReceived:

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

- (void)setOnResponseReceived:(FMCallback *)value

Discussion

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

Declared In

FM.h

– setOnResponseReceivedBlock:

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

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

Discussion

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

Declared In

FM.h

– setOnStreamFailure:

Sets the callback to invoke if the stream errors out.

- (void)setOnStreamFailure:(FMCallback *)value

Discussion

Sets the callback to invoke if the stream errors out.

Declared In

FM.h

– setOnStreamFailureBlock:

Sets the callback to invoke if the stream errors out.

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

Discussion

Sets the callback to invoke if the stream errors out.

Declared In

FM.h

– setSender:

Sets the sender of the messages.

- (void)setSender:(NSObject *)value

Discussion

Sets the sender of the messages.

Declared In

FM.h

– setStreamTimeout:

Sets the timeout for the stream.

- (void)setStreamTimeout:(int)value

Discussion

Sets the timeout for the stream.

Declared In

FM.h

– setUrl:

Sets the URL.

- (void)setUrl:(NSString *)value

Discussion

Sets the URL.

Declared In

FM.h

– shutdown

Releases any resources and shuts down.

- (void)shutdown

Discussion

Releases any resources and shuts down.

Declared In

FM.h

– streamTimeout

Gets the timeout for the stream.

- (int)streamTimeout

Discussion

Gets the timeout for the stream.

Declared In

FM.h

– url

Gets the URL.

- (NSString *)url

Discussion

Gets the URL.

Declared In

FM.h

+ webSocketTransferWithUrl:

Initializes a new instance of the class.

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

Parameters

name="url">The

URL.

Discussion

Initializes a new instance of the class.

Declared In

FM.h