Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

UDPIPv4Socket Class Reference

Wrapper for one or several sockets that provide the physical I/O related methods needed by the data or control connection of an RTP stack, based on UDP and IPv4. Socket for RTP stack based on UDP and IPv4. More...

#include <rtp.h>

Inheritance diagram for UDPIPv4Socket::

UDPReceive UDPTransmit List of all members.

Public Methods

 UDPIPv4Socket (const InetAddress &ia, tpport_t port)
 Constructor. More...

 ~UDPIPv4Socket ()
 Destructor. More...

sockerror_t Connect (const InetHostAddress &ia, tpport_t port)
 Connect to a foreign socket. More...

sockerror_t Connect (const InetMcastAddress &ia, tpport_t port)
 Connect to a foreign socket. More...

bool isPendingPacket (microtimeout_t timeout)
size_t writePacket (const unsigned char *const buffer, size_t len)
size_t readPacket (unsigned char *buffer, size_t len)
sockerror_t setMulticast (bool enable)
sockerror_t joinGroup (const InetMcastAddress &ia)
 Join a multicast group. More...

sockerror_t leaveGroup (const InetMcastAddress &ia)
 Leave a multicast group. More...

sockerror_t setMcastTTL (uint8 ttl)
 Set the value of the TTL field in the packets to send. More...

void endSocket ()
 End socket, terminating the socket connection. More...


Detailed Description

Wrapper for one or several sockets that provide the physical I/O related methods needed by the data or control connection of an RTP stack, based on UDP and IPv4. Socket for RTP stack based on UDP and IPv4.

It should be "straightforward" defining wrappers like this for other underlying protocols, and then instantiating the template T_RTPSocket for them.

Generally, the socket used to transmit does not have to be the same as the one used to receive packets.

Author:
Federico Montesino <p5087@quintero.fie.us.es>


Constructor & Destructor Documentation

UDPIPv4Socket::UDPIPv4Socket const InetAddress &   ia,
tpport_t   port
[inline]
 

Constructor.

Parameters:
bind   network address this socket is to be bound
port   transport port this socket is to be bound

UDPIPv4Socket::~UDPIPv4Socket   [inline]
 

Destructor.


Member Function Documentation

sockerror_t UDPIPv4Socket::Connect const InetMcastAddress &   ia,
tpport_t   port
[inline]
 

Connect to a foreign socket.

Parameters:
ia   multicast address to connect to
port   transport port to connect to

sockerror_t UDPIPv4Socket::Connect const InetHostAddress &   ia,
tpport_t   port
[inline]
 

Connect to a foreign socket.

Parameters:
ia   host address to connect to
port   transport port to connect to

void UDPIPv4Socket::endSocket   [inline]
 

End socket, terminating the socket connection.

bool UDPIPv4Socket::isPendingPacket microtimeout_t   timeout [inline]
 

sockerror_t UDPIPv4Socket::joinGroup const InetMcastAddress &   ia [inline]
 

Join a multicast group.

Parameters:
ia   multicast group address
Returns:
error code from the socket operation

sockerror_t UDPIPv4Socket::leaveGroup const InetMcastAddress &   ia [inline]
 

Leave a multicast group.

Parameters:
ia   multicast group address
Returns:
error code from the socket operation

size_t UDPIPv4Socket::readPacket unsigned char *   buffer,
size_t   len
[inline]
 

sockerror_t UDPIPv4Socket::setMcastTTL uint8   ttl [inline]
 

Set the value of the TTL field in the packets to send.

Parameters:
ttl   Time To Live
Returns:
error code from the socket operation

sockerror_t UDPIPv4Socket::setMulticast bool   enable [inline]
 

size_t UDPIPv4Socket::writePacket const unsigned char *const   buffer,
size_t   len
[inline]
 


The documentation for this class was generated from the following file:
Generated at Wed Dec 5 07:18:09 2001 for ccRTP by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001