class UDPDuplex

Unreliable Datagram Peer Associations. More...

Full nameost::UDPDuplex
Definition#include <socket.h>
Inheritsost::UDPReceive [public ], ost::UDPTransmit [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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.

 UDPDuplex (const InetAddress &bind, tpport_t port)

UDPDuplex

Create a UDP duplex as a pair of UDP simplex objects bound to alternating and interconnected port addresses.

Parameters:
bindaddress to bind this socket to.
portnumber to bind sender.
portnumber to bind reciever.

sockerror_t  Connect (const InetHostAddress &host, tpport_t port)

Connect

Associate the duplex with a specified peer host. Both the sender and receiver will be interconnected with the remote host.

Parameters:
hostaddress to connect socket to.
portnumber to connect socket to.

Returns: 0 on success, error code on error.

Reimplemented from UDPTransmit.

sockerror_t  Disconnect (void)

Disconnect

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.