# PIPDatagramSocket Class Reference

Internet Protocol Datagram Socket class. More...

`#include <ipdsock.h>`

Inheritance diagram for PIPDatagramSocket:

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

PIPDatagramSocket::PIPDatagramSocket | ( |  | ) | `[protected]`

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:

  buf | Data to be written as URGENT TCP data.
  len | Number of bytes pointed to by `buf`.
  addr | Address from which the datagram was received.
  port | Port 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:

  buf | Data to be written as URGENT TCP data.
  len | Number of bytes pointed to by `buf`.
  addr | Address to which the datagram is sent.
  port | Port to which the datagram is sent.

Reimplemented in PSocksUDPSocket.

The documentation for this class was generated from the following file:

- ipdsock.h