A stream socket. More...
Instance Methods | |
| (void) | - acceptAsyncWithOnSuccess:onFailure:onSocket: |
| Accepts a new socket asynchronously. More... | |
| (void) | - acceptAsyncWithOnSuccessBlock:onFailureBlock:onSocketBlock: |
| Accepts a new socket asynchronously. More... | |
| (FMLiveSwitchStreamSocket *) | - acceptAsyncWithOnSuccessBlockAndOnFailureBlockAndOnSocketBlock |
| Accepts a new socket asynchronously. More... | |
| (void) | - connectAsyncWithHostname:ipAddress:port:timeout:onSuccess:onFailure: |
| Connects the socket asynchronously. More... | |
| (void) | - connectAsyncWithHostname:ipAddress:port:timeout:onSuccessBlock:onFailureBlock: |
| Connects the socket asynchronously. More... | |
| (NSException *, bool) | - connectAsyncWithHostnameAndIPAddressAndPortAndTimeoutAndOnSuccessBlockAndOnFailureBlock |
| Connects the socket asynchronously. More... | |
| (instancetype) | - init |
| (FMLiveSwitchAction2< NSException *, id > *) | - onReceiveFailure |
| Gets a callback invoked on failed read from TCP stream. More... | |
| (FMLiveSwitchAction1< FMLiveSwitchDataBuffer * > *) | - onReceiveSuccess |
| Gets a callback invoked on successful read from TCP stream. More... | |
| (void) | - raiseAcceptFailureWithCallback:exception: |
| Invokes the accept failure callback. More... | |
| (void) | - raiseAcceptFailureWithCallbackBlock:exception: |
| Invokes the accept failure callback. More... | |
| (NSException *) | - raiseAcceptFailureWithCallbackBlockAndException |
| Invokes the accept failure callback. More... | |
| (void) | - raiseAcceptSocketWithCallback:socket: |
| Invokes the accept success callback. More... | |
| (void) | - raiseAcceptSocketWithCallbackBlock:socket: |
| Invokes the accept success callback. More... | |
| (FMLiveSwitchStreamSocket *) | - raiseAcceptSocketWithCallbackBlockAndSocket |
| Invokes the accept success callback. More... | |
| (void) | - raiseAcceptSuccessWithCallback: |
| Invokes the accept success callback. More... | |
| (void) | - raiseConnectFailureWithCallback:exception:timedOut: |
| Invokes the connect failure callback. More... | |
| (void) | - raiseConnectFailureWithCallbackBlock:exception:timedOut: |
| Invokes the connect failure callback. More... | |
| (NSException *, bool) | - raiseConnectFailureWithCallbackBlockAndExceptionAndTimedOut |
| Invokes the connect failure callback. More... | |
| (void) | - raiseConnectSuccessWithCallback: |
| Invokes the connect success callback. More... | |
| (void) | - raiseReceiveFailureWithCallback:exception:timedOut: |
| Invokes the receive failure callback. More... | |
| (void) | - raiseReceiveFailureWithCallbackBlock:exception:timedOut: |
| Invokes the receive failure callback. More... | |
| (NSException *, bool) | - raiseReceiveFailureWithCallbackBlockAndExceptionAndTimedOut |
| Invokes the receive failure callback. More... | |
| (void) | - raiseReceiveSuccessWithCallback:buffer: |
| Invokes the receive success callback. More... | |
| (void) | - raiseReceiveSuccessWithCallbackBlock:buffer: |
| Invokes the receive success callback. More... | |
| (FMLiveSwitchDataBuffer *) | - raiseReceiveSuccessWithCallbackBlockAndBuffer |
| Invokes the receive success callback. More... | |
| (void) | - raiseSendFailureWithCallback:exception:timedOut: |
| Invokes the send failure callback. More... | |
| (void) | - raiseSendFailureWithCallbackBlock:exception:timedOut: |
| Invokes the send failure callback. More... | |
| (NSException *, bool) | - raiseSendFailureWithCallbackBlockAndExceptionAndTimedOut |
| Invokes the send failure callback. More... | |
| (void) | - raiseSendSuccessWithCallback: |
| Invokes the send success callback. More... | |
| (void) | - receiveAsyncWithTimeout: |
| Receives data asynchronously. More... | |
| (NSString *) | - remoteHostname |
| Gets the remote hostname. More... | |
| (NSString *) | - remoteIPAddress |
| Gets the remote IP address. More... | |
| (int) | - remotePort |
| Gets the remote port. More... | |
| (bool) | - secure |
| Gets a value indicating whether the socket is secure. More... | |
| (void) | - sendAsyncWithBuffer:timeout:onSuccess:onFailure: |
| Sends data asynchronously. More... | |
| (void) | - sendAsyncWithBuffer:timeout:onSuccessBlock:onFailureBlock: |
| Sends data asynchronously. More... | |
| (NSException *, bool) | - sendAsyncWithBufferAndTimeoutAndOnSuccessBlockAndOnFailureBlock |
| Sends data asynchronously. More... | |
| (bool) | - sendWithBuffer: |
| Sends data synchronously. More... | |
| (bool) | - server |
| Gets a value indicating whether the socket can accept incoming connections. More... | |
| (void) | - setOnReceiveFailure: |
| Sets a callback invoked on failed read from TCP stream. More... | |
| (NSException *, bool) | - setOnReceiveFailureBlock |
| Sets a callback invoked on failed read from TCP stream. More... | |
| (void) | - setOnReceiveFailureBlock: |
| Sets a callback invoked on failed read from TCP stream. More... | |
| (void) | - setOnReceiveSuccess: |
| Sets a callback invoked on successful read from TCP stream. More... | |
| (FMLiveSwitchDataBuffer *) | - setOnReceiveSuccessBlock |
| Sets a callback invoked on successful read from TCP stream. More... | |
| (void) | - setOnReceiveSuccessBlock: |
| Sets a callback invoked on successful read from TCP stream. More... | |
Instance Methods inherited from FMLiveSwitchManagedSocket | |
| (long long) | - adapterSpeed |
| Gets the adapter speed. More... | |
| (bool) | - bindWithIPAddress:port:addressInUse: |
| Binds the socket to a local endpoint. More... | |
| (void) | - close |
| Closes the socket. More... | |
| (bool) | - ipv6 |
| Gets a value indicating whether the socket supports IPv6. More... | |
| (bool) | - isClosed |
| Gets a value indicating whether this instance is closed. More... | |
| (NSString *) | - localIPAddress |
| Gets the local IP address. More... | |
| (int) | - localPort |
| Gets the local port. More... | |
| (NSMutableArray *) | - publicIPAddresses |
| Gets the public IP addresses, if known. More... | |
| (void) | - setAdapterSpeed: |
| Sets the adapter speed. More... | |
| (void) | - setPublicIPAddresses: |
| Sets the public IP addresses, if known. More... | |
Class Methods | |
| (FMLiveSwitchStreamSocket *) | + streamSocket |
Class Methods inherited from FMLiveSwitchManagedSocket | |
| (FMLiveSwitchManagedSocket *) | + managedSocket |
A stream socket.
| - (void) acceptAsyncWithOnSuccess: | (FMLiveSwitchAction0 *) | onSuccess | |
| onFailure: | (FMLiveSwitchAction1< NSException * > *) | onFailure | |
| onSocket: | (FMLiveSwitchAction1< FMLiveSwitchStreamSocket * > *) | onSocket | |
Accepts a new socket asynchronously.
| onSuccess | The callback to invoke on success. |
| onFailure | The callback to invoke on failure. |
| onSocket | The callback to invoke when a socket is ready. |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (void) acceptAsyncWithOnSuccessBlock: | (void(^)(void)) | onSuccessBlock | |
| onFailureBlock: | (void(^)(NSException *)) | onFailureBlock | |
| onSocketBlock: | (void(^)(FMLiveSwitchStreamSocket *)) | onSocketBlock | |
Accepts a new socket asynchronously.
| onSuccessBlock | The callback to invoke on success. |
| onFailureBlock | The callback to invoke on failure. |
| onSocketBlock | The callback to invoke when a socket is ready. |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (FMLiveSwitchStreamSocket*) 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.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (void) connectAsyncWithHostname: | (NSString *) | hostname | |
| ipAddress: | (NSString *) | ipAddress | |
| port: | (int) | port | |
| timeout: | (int) | timeout | |
| onSuccess: | (FMLiveSwitchAction0 *) | onSuccess | |
| onFailure: | (FMLiveSwitchAction2< NSException *, id > *) | onFailure | |
Connects the socket asynchronously.
| 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. |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (void) connectAsyncWithHostname: | (NSString *) | hostname | |
| ipAddress: | (NSString *) | ipAddress | |
| port: | (int) | port | |
| timeout: | (int) | timeout | |
| onSuccessBlock: | (void(^)(void)) | onSuccessBlock | |
| onFailureBlock: | (void(^)(NSException *, bool)) | onFailureBlock | |
Connects the socket asynchronously.
| 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. |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (NSException*, bool) 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.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (instancetype) init |
Implements FMLiveSwitchManagedSocket.
| - (FMLiveSwitchAction2<NSException*,id>*) onReceiveFailure |
Gets a callback invoked on failed read from TCP stream.
| - (FMLiveSwitchAction1<FMLiveSwitchDataBuffer*>*) onReceiveSuccess |
Gets a callback invoked on successful read from TCP stream.
| - (void) raiseAcceptFailureWithCallback: | (FMLiveSwitchAction1< NSException * > *) | callback | |
| exception: | (NSException *) | exception | |
Invokes the accept failure callback.
| callback | The callback. |
| exception | The exception. |
| - (void) raiseAcceptFailureWithCallbackBlock: | (void(^)(NSException *)) | callbackBlock | |
| exception: | (NSException *) | exception | |
Invokes the accept failure callback.
| callbackBlock | The callback. |
| exception | The exception. |
| - (NSException*) raiseAcceptFailureWithCallbackBlockAndException |
Invokes the accept failure callback.
@inlineparam callbackBlock The callback. @inlineparam exception The exception.
| - (void) raiseAcceptSocketWithCallback: | (FMLiveSwitchAction1< FMLiveSwitchStreamSocket * > *) | callback | |
| socket: | (FMLiveSwitchStreamSocket *) | socket | |
Invokes the accept success callback.
| callback | The callback. |
| socket | The socket. |
| - (void) raiseAcceptSocketWithCallbackBlock: | (void(^)(FMLiveSwitchStreamSocket *)) | callbackBlock | |
| socket: | (FMLiveSwitchStreamSocket *) | socket | |
Invokes the accept success callback.
| callbackBlock | The callback. |
| socket | The socket. |
| - (FMLiveSwitchStreamSocket*) raiseAcceptSocketWithCallbackBlockAndSocket |
Invokes the accept success callback.
@inlineparam callbackBlock The callback. @inlineparam socket The socket.
| - (void) raiseAcceptSuccessWithCallback: | (FMLiveSwitchAction0 *) | callback |
Invokes the accept success callback.
| callback | The callback. |
| - (void) raiseConnectFailureWithCallback: | (FMLiveSwitchAction2< NSException *, id > *) | callback | |
| exception: | (NSException *) | exception | |
| timedOut: | (bool) | timedOut | |
Invokes the connect failure callback.
| callback | The callback. |
| exception | The exception. |
| timedOut | if set to true [timed out]. |
| - (void) raiseConnectFailureWithCallbackBlock: | (void(^)(NSException *, bool)) | callbackBlock | |
| exception: | (NSException *) | exception | |
| timedOut: | (bool) | timedOut | |
Invokes the connect failure callback.
| callbackBlock | The callback. |
| exception | The exception. |
| timedOut | if set to true [timed out]. |
| - (NSException*, bool) raiseConnectFailureWithCallbackBlockAndExceptionAndTimedOut |
Invokes the connect failure callback.
@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].
| - (void) raiseConnectSuccessWithCallback: | (FMLiveSwitchAction0 *) | callback |
Invokes the connect success callback.
| callback | The callback. |
| - (void) raiseReceiveFailureWithCallback: | (FMLiveSwitchAction2< NSException *, id > *) | callback | |
| exception: | (NSException *) | exception | |
| timedOut: | (bool) | timedOut | |
Invokes the receive failure callback.
| callback | The callback. |
| exception | The exception. |
| timedOut | if set to true [timed out]. |
| - (void) raiseReceiveFailureWithCallbackBlock: | (void(^)(NSException *, bool)) | callbackBlock | |
| exception: | (NSException *) | exception | |
| timedOut: | (bool) | timedOut | |
Invokes the receive failure callback.
| callbackBlock | The callback. |
| exception | The exception. |
| timedOut | if set to true [timed out]. |
| - (NSException*, bool) raiseReceiveFailureWithCallbackBlockAndExceptionAndTimedOut |
Invokes the receive failure callback.
@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].
| - (void) raiseReceiveSuccessWithCallback: | (FMLiveSwitchAction1< FMLiveSwitchDataBuffer * > *) | callback | |
| buffer: | (FMLiveSwitchDataBuffer *) | buffer | |
Invokes the receive success callback.
| callback | The callback. |
| buffer | The buffer. |
| - (void) raiseReceiveSuccessWithCallbackBlock: | (void(^)(FMLiveSwitchDataBuffer *)) | callbackBlock | |
| buffer: | (FMLiveSwitchDataBuffer *) | buffer | |
Invokes the receive success callback.
| callbackBlock | The callback. |
| buffer | The buffer. |
| - (FMLiveSwitchDataBuffer*) raiseReceiveSuccessWithCallbackBlockAndBuffer |
Invokes the receive success callback.
@inlineparam callbackBlock The callback. @inlineparam buffer The buffer.
| - (void) raiseSendFailureWithCallback: | (FMLiveSwitchAction2< NSException *, id > *) | callback | |
| exception: | (NSException *) | exception | |
| timedOut: | (bool) | timedOut | |
Invokes the send failure callback.
| callback | The callback. |
| exception | The exception. |
| timedOut | if set to true [timed out]. |
| - (void) raiseSendFailureWithCallbackBlock: | (void(^)(NSException *, bool)) | callbackBlock | |
| exception: | (NSException *) | exception | |
| timedOut: | (bool) | timedOut | |
Invokes the send failure callback.
| callbackBlock | The callback. |
| exception | The exception. |
| timedOut | if set to true [timed out]. |
| - (NSException*, bool) raiseSendFailureWithCallbackBlockAndExceptionAndTimedOut |
Invokes the send failure callback.
@inlineparam callbackBlock The callback. @inlineparam exception The exception. @inlineparam timedOut if set to true [timed out].
| - (void) raiseSendSuccessWithCallback: | (FMLiveSwitchAction0 *) | callback |
Invokes the send success callback.
| callback | The callback. |
| - (void) receiveAsyncWithTimeout: | (int) | timeout |
Receives data asynchronously.
| timeout | The timeout (in ms). |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (NSString*) remoteHostname |
Gets the remote hostname.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (NSString*) remoteIPAddress |
Gets the remote IP address.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (int) remotePort |
Gets the remote port.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (bool) secure |
Gets a value indicating whether the socket is secure.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (void) sendAsyncWithBuffer: | (FMLiveSwitchDataBuffer *) | buffer | |
| timeout: | (int) | timeout | |
| onSuccess: | (FMLiveSwitchAction0 *) | onSuccess | |
| onFailure: | (FMLiveSwitchAction2< NSException *, id > *) | onFailure | |
Sends data asynchronously.
| buffer | The buffer. |
| timeout | The timeout (in ms). |
| onSuccess | The callback to invoke on success. |
| onFailure | The callback to invoke on failure. |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (void) sendAsyncWithBuffer: | (FMLiveSwitchDataBuffer *) | buffer | |
| timeout: | (int) | timeout | |
| onSuccessBlock: | (void(^)(void)) | onSuccessBlock | |
| onFailureBlock: | (void(^)(NSException *, bool)) | onFailureBlock | |
Sends data asynchronously.
| buffer | The buffer. |
| timeout | The timeout (in ms). |
| onSuccessBlock | The callback to invoke on success. |
| onFailureBlock | The callback to invoke on failure. |
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (NSException*, bool) 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.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (bool) sendWithBuffer: | (FMLiveSwitchDataBuffer *) | buffer |
| - (bool) server |
Gets a value indicating whether the socket can accept incoming connections.
Implemented in FMLiveSwitchVirtualTcpSocket.
| - (void) setOnReceiveFailure: | (FMLiveSwitchAction2< NSException *, id > *) | value |
Sets a callback invoked on failed read from TCP stream.
| - (NSException*, bool) setOnReceiveFailureBlock |
Sets a callback invoked on failed read from TCP stream.
| - (void) setOnReceiveFailureBlock: | (void(^)(NSException *, bool)) | valueBlock |
Sets a callback invoked on failed read from TCP stream.
| - (void) setOnReceiveSuccess: | (FMLiveSwitchAction1< FMLiveSwitchDataBuffer * > *) | value |
Sets a callback invoked on successful read from TCP stream.
| - (FMLiveSwitchDataBuffer*) setOnReceiveSuccessBlock |
Sets a callback invoked on successful read from TCP stream.
| - (void) setOnReceiveSuccessBlock: | (void(^)(FMLiveSwitchDataBuffer *)) | valueBlock |
Sets a callback invoked on successful read from TCP stream.
| + (FMLiveSwitchStreamSocket*) streamSocket |