PTLib  Version 2.10.4
PIPDatagramSocket Class Reference

Internet Protocol Datagram Socket class. More...

#include <ipdsock.h>

Inheritance diagram for PIPDatagramSocket:
PIPSocket PSocket PChannel PObject PICMPSocket PUDPSocket PSocksUDPSocket PSTUNUDPSocket

List of all members.

Public Member Functions

virtual PBoolean ReadFrom (void *buf, PINDEX len, Address &addr, WORD &port)
 Read a datagram from a remote computer.
virtual PBoolean WriteTo (const void *buf, PINDEX len, const Address &addr, WORD port)
 Write a datagram to a remote computer.

Protected Member Functions

 PIPDatagramSocket ()
 Create a TCP/IP protocol socket channel.

Detailed Description

Internet Protocol Datagram Socket class.


Constructor & Destructor Documentation

Create a TCP/IP protocol socket channel.

If a remote machine address or a "listening" socket is specified then the channel is also opened.


Member Function Documentation

virtual PBoolean PIPDatagramSocket::ReadFrom ( void *  buf,
PINDEX  len,
Address addr,
WORD &  port 
) [virtual]

Read a datagram from a remote computer.

Returns:
true if any bytes were sucessfully read.
Parameters:
bufData to be written as URGENT TCP data.
lenNumber of bytes pointed to by buf.
addrAddress from which the datagram was received.
portPort from which the datagram was received.

Reimplemented in PSocksUDPSocket.

virtual PBoolean PIPDatagramSocket::WriteTo ( const void *  buf,
PINDEX  len,
const Address addr,
WORD  port 
) [virtual]

Write a datagram to a remote computer.

Returns:
true if all the bytes were sucessfully written.
Parameters:
bufData to be written as URGENT TCP data.
lenNumber of bytes pointed to by buf.
addrAddress to which the datagram is sent.
portPort to which the datagram is sent.

Reimplemented in PSocksUDPSocket.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines