FMIceLinkStreamSocket Class Reference

Inherits from FMIceLinkManagedSocket : NSObject
Declared in FMIceLinkStreamSocket.h
FMIceLinkStreamSocket.m

Overview

A stream socket.

– acceptAsyncWithOnSuccess:onFailure:onSocket:

Accepts a new socket asynchronously.
- (void)acceptAsyncWithOnSuccess:(FMIceLinkAction0 *)onSuccess onFailure:(FMIceLinkAction1 *)onFailure onSocket:(FMIceLinkAction1 *)onSocket

Parameters

onSuccess

The callback to invoke on success.

onFailure

The callback to invoke on failure.

onSocket

The callback to invoke when a socket is ready.

Discussion

Accepts a new socket asynchronously.

Declared In

FMIceLinkStreamSocket.h

– acceptAsyncWithOnSuccessBlock:onFailureBlock:onSocketBlock:

Accepts a new socket asynchronously.
- (void)acceptAsyncWithOnSuccessBlock:(void ( ^ ) ( ))onSuccessBlock onFailureBlock:(void ( ^ ) ( NSException *))onFailureBlock onSocketBlock:(void ( ^ ) ( FMIceLinkStreamSocket *))onSocketBlock

Parameters

onSuccessBlock

The callback to invoke on success.

onFailureBlock

The callback to invoke on failure.

onSocketBlock

The callback to invoke when a socket is ready.

Discussion

Accepts a new socket asynchronously.

Declared In

FMIceLinkStreamSocket.h

– acceptAsyncWithOnSuccessBlockAndOnFailureBlockAndOnSocketBlock

Accepts a new socket asynchronously.

@inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure. @inlineparam onSocketBlock The callback to invoke when a socket is ready.

- (void ( ^ ) ( void ( ^ ) ( ) , void ( ^ ) ( NSException *) , void ( ^ ) ( FMIceLinkStreamSocket *) ))acceptAsyncWithOnSuccessBlockAndOnFailureBlockAndOnSocketBlock

Discussion

Accepts a new socket asynchronously.

@inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure. @inlineparam onSocketBlock The callback to invoke when a socket is ready.

Declared In

FMIceLinkStreamSocket.h

– connectAsyncWithHostname:ipAddress:port:timeout:onSuccess:onFailure:

Connects the socket asynchronously.
- (void)connectAsyncWithHostname:(NSString *)hostname ipAddress:(NSString *)ipAddress port:(int)port timeout:(int)timeout onSuccess:(FMIceLinkAction0 *)onSuccess onFailure:(FMIceLinkAction2 *)onFailure

Parameters

hostname

The remote hostname.

ipAddress

The remote IP address.

port

The remote port.

timeout

The timeout (in ms).

onSuccess

The callback to invoke on success.

onFailure

The callback to invoke on failure.

Discussion

Connects the socket asynchronously.

Declared In

FMIceLinkStreamSocket.h

– connectAsyncWithHostname:ipAddress:port:timeout:onSuccessBlock:onFailureBlock:

Connects the socket asynchronously.
- (void)connectAsyncWithHostname:(NSString *)hostname ipAddress:(NSString *)ipAddress port:(int)port timeout:(int)timeout onSuccessBlock:(void ( ^ ) ( ))onSuccessBlock onFailureBlock:(void ( ^ ) ( NSException *, bool ))onFailureBlock

Parameters

hostname

The remote hostname.

ipAddress

The remote IP address.

port

The remote port.

timeout

The timeout (in ms).

onSuccessBlock

The callback to invoke on success.

onFailureBlock

The callback to invoke on failure.

Discussion

Connects the socket asynchronously.

Declared In

FMIceLinkStreamSocket.h

– connectAsyncWithHostnameAndIPAddressAndPortAndTimeoutAndOnSuccessBlockAndOnFailureBlock

Connects the socket asynchronously.

@inlineparam hostname The remote hostname. @inlineparam ipAddress The remote IP address. @inlineparam port The remote port. @inlineparam timeout The timeout (in ms). @inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure.

- (void ( ^ ) ( NSString *, NSString *, int , int , void ( ^ ) ( ) , void ( ^ ) ( NSException *, bool ) ))connectAsyncWithHostnameAndIPAddressAndPortAndTimeoutAndOnSuccessBlockAndOnFailureBlock

Discussion

Connects the socket asynchronously.

@inlineparam hostname The remote hostname. @inlineparam ipAddress The remote IP address. @inlineparam port The remote port. @inlineparam timeout The timeout (in ms). @inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure.

Declared In

FMIceLinkStreamSocket.h

– onReceiveFailure

Gets a callback invoked on failed read from TCP stream.
- (FMIceLinkAction2 *)onReceiveFailure

Discussion

Gets a callback invoked on failed read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– onReceiveSuccess

Gets a callback invoked on successful read from TCP stream.
- (FMIceLinkAction1 *)onReceiveSuccess

Discussion

Gets a callback invoked on successful read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptFailureWithCallback:exception:

Invokes the accept failure callback.
- (void)raiseAcceptFailureWithCallback:(FMIceLinkAction1 *)callback exception:(NSException *)exception

Parameters

callback

The callback.

exception

The exception.

Discussion

Invokes the accept failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptFailureWithCallbackBlock:exception:

Invokes the accept failure callback.
- (void)raiseAcceptFailureWithCallbackBlock:(void ( ^ ) ( NSException *))callbackBlock exception:(NSException *)exception

Parameters

callbackBlock

The callback.

exception

The exception.

Discussion

Invokes the accept failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptFailureWithCallbackBlockAndException

Invokes the accept failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception.

- (void ( ^ ) ( void ( ^ ) ( NSException *) , NSException *))raiseAcceptFailureWithCallbackBlockAndException

Discussion

Invokes the accept failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptSocketWithCallback:socket:

Invokes the accept success callback.
- (void)raiseAcceptSocketWithCallback:(FMIceLinkAction1 *)callback socket:(FMIceLinkStreamSocket *)socket

Parameters

callback

The callback.

socket

The socket.

Discussion

Invokes the accept success callback.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptSocketWithCallbackBlock:socket:

Invokes the accept success callback.
- (void)raiseAcceptSocketWithCallbackBlock:(void ( ^ ) ( FMIceLinkStreamSocket *))callbackBlock socket:(FMIceLinkStreamSocket *)socket

Parameters

callbackBlock

The callback.

socket

The socket.

Discussion

Invokes the accept success callback.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptSocketWithCallbackBlockAndSocket

Invokes the accept success callback.

@inlineparam callbackBlock The callback. @inlineparam socket The socket.

- (void ( ^ ) ( void ( ^ ) ( FMIceLinkStreamSocket *) , FMIceLinkStreamSocket *))raiseAcceptSocketWithCallbackBlockAndSocket

Discussion

Invokes the accept success callback.

@inlineparam callbackBlock The callback. @inlineparam socket The socket.

Declared In

FMIceLinkStreamSocket.h

– raiseAcceptSuccessWithCallback:

Invokes the accept success callback.
- (void)raiseAcceptSuccessWithCallback:(FMIceLinkAction0 *)callback

Parameters

callback

The callback.

Discussion

Invokes the accept success callback.

Declared In

FMIceLinkStreamSocket.h

– raiseConnectFailureWithCallback:exception:timedOut:

Invokes the connect failure callback.
- (void)raiseConnectFailureWithCallback:(FMIceLinkAction2 *)callback exception:(NSException *)exception timedOut:(bool)timedOut

Parameters

callback

The callback.

exception

The exception.

timedOut

if set to true [timed out].

Discussion

Invokes the connect failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseConnectFailureWithCallbackBlock:exception:timedOut:

Invokes the connect failure callback.
- (void)raiseConnectFailureWithCallbackBlock:(void ( ^ ) ( NSException *, bool ))callbackBlock exception:(NSException *)exception timedOut:(bool)timedOut

Parameters

callbackBlock

The callback.

exception

The exception.

timedOut

if set to true [timed out].

Discussion

Invokes the connect failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseConnectFailureWithCallbackBlockAndExceptionAndTimedOut

Invokes the connect failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].

- (void ( ^ ) ( void ( ^ ) ( NSException *, bool ) , NSException *, bool ))raiseConnectFailureWithCallbackBlockAndExceptionAndTimedOut

Discussion

Invokes the connect failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].

Declared In

FMIceLinkStreamSocket.h

– raiseConnectSuccessWithCallback:

Invokes the connect success callback.
- (void)raiseConnectSuccessWithCallback:(FMIceLinkAction0 *)callback

Parameters

callback

The callback.

Discussion

Invokes the connect success callback.

Declared In

FMIceLinkStreamSocket.h

– raiseReceiveFailureWithCallback:exception:timedOut:

Invokes the receive failure callback.
- (void)raiseReceiveFailureWithCallback:(FMIceLinkAction2 *)callback exception:(NSException *)exception timedOut:(bool)timedOut

Parameters

callback

The callback.

exception

The exception.

timedOut

if set to true [timed out].

Discussion

Invokes the receive failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseReceiveFailureWithCallbackBlock:exception:timedOut:

Invokes the receive failure callback.
- (void)raiseReceiveFailureWithCallbackBlock:(void ( ^ ) ( NSException *, bool ))callbackBlock exception:(NSException *)exception timedOut:(bool)timedOut

Parameters

callbackBlock

The callback.

exception

The exception.

timedOut

if set to true [timed out].

Discussion

Invokes the receive failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseReceiveFailureWithCallbackBlockAndExceptionAndTimedOut

Invokes the receive failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].

- (void ( ^ ) ( void ( ^ ) ( NSException *, bool ) , NSException *, bool ))raiseReceiveFailureWithCallbackBlockAndExceptionAndTimedOut

Discussion

Invokes the receive failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].

Declared In

FMIceLinkStreamSocket.h

– raiseReceiveSuccessWithCallback:buffer:

Invokes the receive success callback.
- (void)raiseReceiveSuccessWithCallback:(FMIceLinkAction1 *)callback buffer:(FMIceLinkDataBuffer *)buffer

Parameters

callback

The callback.

buffer

The buffer.

Discussion

Invokes the receive success callback.

Declared In

FMIceLinkStreamSocket.h

– raiseReceiveSuccessWithCallbackBlock:buffer:

Invokes the receive success callback.
- (void)raiseReceiveSuccessWithCallbackBlock:(void ( ^ ) ( FMIceLinkDataBuffer *))callbackBlock buffer:(FMIceLinkDataBuffer *)buffer

Parameters

callbackBlock

The callback.

buffer

The buffer.

Discussion

Invokes the receive success callback.

Declared In

FMIceLinkStreamSocket.h

– raiseReceiveSuccessWithCallbackBlockAndBuffer

Invokes the receive success callback.

@inlineparam callbackBlock The callback. @inlineparam buffer The buffer.

- (void ( ^ ) ( void ( ^ ) ( FMIceLinkDataBuffer *) , FMIceLinkDataBuffer *))raiseReceiveSuccessWithCallbackBlockAndBuffer

Discussion

Invokes the receive success callback.

@inlineparam callbackBlock The callback. @inlineparam buffer The buffer.

Declared In

FMIceLinkStreamSocket.h

– raiseSendFailureWithCallback:exception:timedOut:

Invokes the send failure callback.
- (void)raiseSendFailureWithCallback:(FMIceLinkAction2 *)callback exception:(NSException *)exception timedOut:(bool)timedOut

Parameters

callback

The callback.

exception

The exception.

timedOut

if set to true [timed out].

Discussion

Invokes the send failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseSendFailureWithCallbackBlock:exception:timedOut:

Invokes the send failure callback.
- (void)raiseSendFailureWithCallbackBlock:(void ( ^ ) ( NSException *, bool ))callbackBlock exception:(NSException *)exception timedOut:(bool)timedOut

Parameters

callbackBlock

The callback.

exception

The exception.

timedOut

if set to true [timed out].

Discussion

Invokes the send failure callback.

Declared In

FMIceLinkStreamSocket.h

– raiseSendFailureWithCallbackBlockAndExceptionAndTimedOut

Invokes the send failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].

- (void ( ^ ) ( void ( ^ ) ( NSException *, bool ) , NSException *, bool ))raiseSendFailureWithCallbackBlockAndExceptionAndTimedOut

Discussion

Invokes the send failure callback.

@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].

Declared In

FMIceLinkStreamSocket.h

– raiseSendSuccessWithCallback:

Invokes the send success callback.
- (void)raiseSendSuccessWithCallback:(FMIceLinkAction0 *)callback

Parameters

callback

The callback.

Discussion

Invokes the send success callback.

Declared In

FMIceLinkStreamSocket.h

– receiveAsyncWithTimeout:

Receives data asynchronously.
- (void)receiveAsyncWithTimeout:(int)timeout

Parameters

timeout

The timeout (in ms).

Discussion

Receives data asynchronously.

Declared In

FMIceLinkStreamSocket.h

– remoteHostname

Gets the remote hostname.
- (NSString *)remoteHostname

Discussion

Gets the remote hostname.

Declared In

FMIceLinkStreamSocket.h

– remoteIPAddress

Gets the remote IP address.
- (NSString *)remoteIPAddress

Discussion

Gets the remote IP address.

Declared In

FMIceLinkStreamSocket.h

– remotePort

Gets the remote port.
- (int)remotePort

Discussion

Gets the remote port.

Declared In

FMIceLinkStreamSocket.h

– secure

Gets a value indicating whether the socket is secure.
- (bool)secure

Discussion

Gets a value indicating whether the socket is secure.

Declared In

FMIceLinkStreamSocket.h

– sendAsyncWithBuffer:timeout:onSuccess:onFailure:

Sends data asynchronously.
- (void)sendAsyncWithBuffer:(FMIceLinkDataBuffer *)buffer timeout:(int)timeout onSuccess:(FMIceLinkAction0 *)onSuccess onFailure:(FMIceLinkAction2 *)onFailure

Parameters

buffer

The buffer.

timeout

The timeout (in ms).

onSuccess

The callback to invoke on success.

onFailure

The callback to invoke on failure.

Discussion

Sends data asynchronously.

Declared In

FMIceLinkStreamSocket.h

– sendAsyncWithBuffer:timeout:onSuccessBlock:onFailureBlock:

Sends data asynchronously.
- (void)sendAsyncWithBuffer:(FMIceLinkDataBuffer *)buffer timeout:(int)timeout onSuccessBlock:(void ( ^ ) ( ))onSuccessBlock onFailureBlock:(void ( ^ ) ( NSException *, bool ))onFailureBlock

Parameters

buffer

The buffer.

timeout

The timeout (in ms).

onSuccessBlock

The callback to invoke on success.

onFailureBlock

The callback to invoke on failure.

Discussion

Sends data asynchronously.

Declared In

FMIceLinkStreamSocket.h

– sendAsyncWithBufferAndTimeoutAndOnSuccessBlockAndOnFailureBlock

Sends data asynchronously.

@inlineparam buffer The buffer. @inlineparam timeout The timeout (in ms). @inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure.

- (void ( ^ ) ( FMIceLinkDataBuffer *, int , void ( ^ ) ( ) , void ( ^ ) ( NSException *, bool ) ))sendAsyncWithBufferAndTimeoutAndOnSuccessBlockAndOnFailureBlock

Discussion

Sends data asynchronously.

@inlineparam buffer The buffer. @inlineparam timeout The timeout (in ms). @inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure.

Declared In

FMIceLinkStreamSocket.h

– sendWithBuffer:

Sends data synchronously.
- (bool)sendWithBuffer:(FMIceLinkDataBuffer *)buffer

Parameters

buffer

The buffer.

Discussion

Sends data synchronously.

Declared In

FMIceLinkStreamSocket.h

– server

Gets a value indicating whether the socket can accept incoming connections.
- (bool)server

Discussion

Gets a value indicating whether the socket can accept incoming connections.

Declared In

FMIceLinkStreamSocket.h

– setOnReceiveFailure:

Sets a callback invoked on failed read from TCP stream.
- (void)setOnReceiveFailure:(FMIceLinkAction2 *)value

Discussion

Sets a callback invoked on failed read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– setOnReceiveFailureBlock

Sets a callback invoked on failed read from TCP stream.
- (void ( ^ ) ( void ( ^ ) ( NSException *, bool ) ))setOnReceiveFailureBlock

Discussion

Sets a callback invoked on failed read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– setOnReceiveFailureBlock:

Sets a callback invoked on failed read from TCP stream.
- (void)setOnReceiveFailureBlock:(void ( ^ ) ( NSException *, bool ))valueBlock

Discussion

Sets a callback invoked on failed read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– setOnReceiveSuccess:

Sets a callback invoked on successful read from TCP stream.
- (void)setOnReceiveSuccess:(FMIceLinkAction1 *)value

Discussion

Sets a callback invoked on successful read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– setOnReceiveSuccessBlock

Sets a callback invoked on successful read from TCP stream.
- (void ( ^ ) ( void ( ^ ) ( FMIceLinkDataBuffer *) ))setOnReceiveSuccessBlock

Discussion

Sets a callback invoked on successful read from TCP stream.

Declared In

FMIceLinkStreamSocket.h

– setOnReceiveSuccessBlock:

Sets a callback invoked on successful read from TCP stream.
- (void)setOnReceiveSuccessBlock:(void ( ^ ) ( FMIceLinkDataBuffer *))valueBlock

Discussion

Sets a callback invoked on successful read from TCP stream.

Declared In

FMIceLinkStreamSocket.h