|
|
UDP duplex connections impliment a bi-directional point-to-point UDP session between two peer hosts. Two UDP sockets are typically used on alternating port addresses to assure that sender and receiver data does not collide or echo back. A UDP Duplex is commonly used for full duplex real-time streaming of UDP data between hosts.
sockerror_t setBroadcast (bool enable) |
Set broadcast state on sending socket only.
Parameters:
true | to enable. |
Reimplemented from UDPTransmit
UDPDuplex (const InetAddress &bind, tpport_t from, tpport_t to) |
Create a UDP duplex as a pair of UDP simplex objects bound to alternating and interconnected port addresses.
Parameters:
bind | address to bind this socket to. |
port | number to bind sender. |
port | number to bind reciever. |
sockerror_t Connect (const InetHostAddress &host) |
Associate the duplex with a specified peer host. Both the sender and receiver will be interconnected with the remote host.
Parameters:
host | address to connect socket to. |
Returns: 0 on success, error code on error.
Reimplemented from UDPTransmit
sockerror_t Disconnect (void) |
Disassociate this duplex from any host connection. No data should be read or written until a connection is established.
Returns: 0 on success, error code on error.
Reimplemented from UDPTransmit
sockerror_t setRouting (bool enable) |
Set routing for both pairs of the duplex.
Parameters:
true | to enable routing. |
Reimplemented from UDPTransmit
sockerror_t setTypeOfService (socktos_t tos) |
Set type of service for both pairs of sockets.
Parameters:
type | of service for pair of sockets. |
Reimplemented from UDPTransmit