FMLiveSwitchVirtualUdpSocket Class Reference

Instance Methods

(bool) - bind
 
(bool) - bindWithAddressInUse:
 
(bool) - bindWithIPAddress:
 
(bool) - bindWithIPAddress:addressInUse:
 
(bool) - bindWithIPAddress:port:
 
(bool) - bindWithIPAddress:port:addressInUse:
 Binds the socket to a local endpoint. More...
 
(bool) - bindWithPort:
 
(bool) - bindWithPort:addressInUse:
 
(void) - close
 Closes the socket. More...
 
(NSString *) - description
 
(instancetype) - initWithAdapter:
 
(instancetype) - initWithAdapter:ipv6:
 
(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...
 
(int) - maxQueuedPackets
 Gets the maximum number of packets that can be queued at any given point in time. More...
 
(FMLiveSwitchVirtualPacket *) - receive
 
(void) - receiveAsyncWithOnSuccess:onFailure:
 Receives data asynchronously. More...
 
(void) - receiveAsyncWithOnSuccessBlock:onFailureBlock:
 Receives data asynchronously. More...
 
(NSException *) - receiveAsyncWithOnSuccessBlockAndOnFailureBlock
 Receives data asynchronously. More...
 
(int) - receiveBufferSize
 Gets the current receive buffer size. More...
 
(FMLiveSwitchVirtualPacket *) - receiveWithTimeout:
 
(int) - sendBufferSize
 Gets the current send buffer size. More...
 
(int) - sendDelay
 
(FMLiveSwitchError *) - sendWithBuffer:ipAddress:port:
 Sends data synchronously. More...
 
(void) - setMaxQueuedPackets:
 Sets the maximum number of packets that can be queued at any given point in time. More...
 
(void) - setSendDelay:
 
- Instance Methods inherited from FMLiveSwitchDatagramSocket
(instancetype) - init
 
(void) - raiseReceiveFailureWithCallback:exception:
 Invokes the receive failure callback. More...
 
(void) - raiseReceiveFailureWithCallbackBlock:exception:
 Invokes the receive failure callback. More...
 
(NSException *) - raiseReceiveFailureWithCallbackBlockAndException
 Invokes the receive failure callback. More...
 
(void) - raiseReceiveSuccessWithCallback:buffer:ipAddress:port:
 Invokes the receive success callback. More...
 
(void) - raiseReceiveSuccessWithCallbackBlock:buffer:ipAddress:port:
 Invokes the receive success callback. More...
 
(FMLiveSwitchDataBuffer *, NSString *, int) - raiseReceiveSuccessWithCallbackBlockAndBufferAndIPAddressAndPort
 Invokes the receive success callback. More...
 
- Instance Methods inherited from FMLiveSwitchManagedSocket
(long long) - adapterSpeed
 Gets the adapter speed. 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

(FMLiveSwitchVirtualUdpSocket *) + udpSocketWithAdapter:
 
(FMLiveSwitchVirtualUdpSocket *) + udpSocketWithAdapter:ipv6:
 
- Class Methods inherited from FMLiveSwitchDatagramSocket
(FMLiveSwitchDatagramSocket *) + datagramSocket
 
- Class Methods inherited from FMLiveSwitchManagedSocket
(FMLiveSwitchManagedSocket *) + managedSocket
 

Method Documentation

◆ bind

- (bool) bind

◆ bindWithAddressInUse:

- (bool) bindWithAddressInUse: (bool *)  addressInUse

◆ bindWithIPAddress:

- (bool) bindWithIPAddress: (NSString *)  ipAddress

◆ bindWithIPAddress:addressInUse:

- (bool) bindWithIPAddress: (NSString *)  ipAddress
addressInUse: (bool *)  addressInUse 

◆ bindWithIPAddress:port:

- (bool) bindWithIPAddress: (NSString *)  ipAddress
port: (int)  port 

◆ bindWithIPAddress:port:addressInUse:

- (bool) bindWithIPAddress: (NSString *)  ipAddress
port: (int)  port
addressInUse: (bool *)  addressInUse 

Binds the socket to a local endpoint.

Parameters
ipAddressThe local IP address.
portThe local port.
addressInUseIndicates that access to the address is forbidden or in use.

Implements FMLiveSwitchManagedSocket.

◆ bindWithPort:

- (bool) bindWithPort: (int)  port

◆ bindWithPort:addressInUse:

- (bool) bindWithPort: (int)  port
addressInUse: (bool *)  addressInUse 

◆ close

- (void) close

Closes the socket.

Implements FMLiveSwitchManagedSocket.

◆ description

- (NSString*) description

◆ initWithAdapter:

- (instancetype) initWithAdapter: (FMLiveSwitchVirtualAdapter *)  adapter

◆ initWithAdapter:ipv6:

- (instancetype) initWithAdapter: (FMLiveSwitchVirtualAdapter *)  adapter
ipv6: (bool)  ipv6 

◆ ipv6

- (bool) ipv6

Gets a value indicating whether the socket supports IPv6.

Implements FMLiveSwitchManagedSocket.

◆ isClosed

- (bool) isClosed

Gets a value indicating whether this instance is closed.

Implements FMLiveSwitchManagedSocket.

◆ localIPAddress

- (NSString*) localIPAddress

Gets the local IP address.

Implements FMLiveSwitchManagedSocket.

◆ localPort

- (int) localPort

Gets the local port.

Implements FMLiveSwitchManagedSocket.

◆ maxQueuedPackets

- (int) maxQueuedPackets

Gets the maximum number of packets that can be queued at any given point in time.

Implements FMLiveSwitchDatagramSocket.

◆ receive

◆ receiveAsyncWithOnSuccess:onFailure:

- (void) receiveAsyncWithOnSuccess: (FMLiveSwitchAction3< FMLiveSwitchDataBuffer *, NSString *, id > *)  onSuccess
onFailure: (FMLiveSwitchAction1< NSException * > *)  onFailure 

Receives data asynchronously.

Parameters
onSuccessThe callback to invoke on success.
onFailureThe callback to invoke on failure.

Implements FMLiveSwitchDatagramSocket.

◆ receiveAsyncWithOnSuccessBlock:onFailureBlock:

- (void) receiveAsyncWithOnSuccessBlock: (void(^)(FMLiveSwitchDataBuffer *, NSString *, int))  onSuccessBlock
onFailureBlock: (void(^)(NSException *))  onFailureBlock 

Receives data asynchronously.

Parameters
onSuccessBlockThe callback to invoke on success.
onFailureBlockThe callback to invoke on failure.

Implements FMLiveSwitchDatagramSocket.

◆ receiveAsyncWithOnSuccessBlockAndOnFailureBlock

- (NSException*) receiveAsyncWithOnSuccessBlockAndOnFailureBlock

Receives data asynchronously.

@inlineparam onSuccessBlock The callback to invoke on success. @inlineparam onFailureBlock The callback to invoke on failure.

Implements FMLiveSwitchDatagramSocket.

◆ receiveBufferSize

- (int) receiveBufferSize

Gets the current receive buffer size.

Implements FMLiveSwitchDatagramSocket.

◆ receiveWithTimeout:

- (FMLiveSwitchVirtualPacket*) receiveWithTimeout: (int)  timeout

◆ sendBufferSize

- (int) sendBufferSize

Gets the current send buffer size.

Implements FMLiveSwitchDatagramSocket.

◆ sendDelay

- (int) sendDelay

◆ sendWithBuffer:ipAddress:port:

- (FMLiveSwitchError*) sendWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
ipAddress: (NSString *)  ipAddress
port: (int)  port 

Sends data synchronously.

Parameters
bufferThe buffer.
ipAddressThe remote IP address.
portThe remote port.

Implements FMLiveSwitchDatagramSocket.

◆ setMaxQueuedPackets:

- (void) setMaxQueuedPackets: (int)  value

Sets the maximum number of packets that can be queued at any given point in time.

Implements FMLiveSwitchDatagramSocket.

◆ setSendDelay:

- (void) setSendDelay: (int)  value

◆ udpSocketWithAdapter:

+ (FMLiveSwitchVirtualUdpSocket*) udpSocketWithAdapter: (FMLiveSwitchVirtualAdapter *)  adapter

◆ udpSocketWithAdapter:ipv6: