Apache log4cxx
Version 0.12.1
|
This class represents a datagram packet. More...
#include <datagrampacket.h>
Public Member Functions | |
DatagramPacket (void *buf, int length) | |
Constructs a DatagramPacket for receiving packets of length length . More... | |
DatagramPacket (void *buf, int length, InetAddressPtr address, int port) | |
Constructs a datagram packet for sending packets of length length to the specified port number on the specified host. More... | |
DatagramPacket (void *buf, int offset, int length) | |
Constructs a DatagramPacket for receiving packets of length length , specifying an offset into the buffer. More... | |
DatagramPacket (void *buf, int offset, int length, InetAddressPtr address, int port) | |
Constructs a datagram packet for sending packets of length length with offset offset to the specified port number on the specified host. More... | |
~DatagramPacket () | |
InetAddressPtr | getAddress () const |
Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received. More... | |
void * | getData () const |
Returns the data received or the data to be sent. More... | |
int | getLength () const |
Returns the length of the data to be sent or the length of the data received. More... | |
int | getOffset () const |
Returns the offset of the data to be sent or the offset of the data received. More... | |
int | getPort () const |
Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received. More... | |
void | setAddress (InetAddressPtr address1) |
void | setData (void *buf1) |
Set the data buffer for this packet. More... | |
void | setData (void *buf1, int offset1, int length1) |
Set the data buffer for this packet. More... | |
void | setLength (int length1) |
Set the length for this packet. More... | |
void | setPort (int port1) |
Public Member Functions inherited from log4cxx::helpers::Object | |
virtual | ~Object () |
virtual bool | instanceof (const Class &clazz) const =0 |
virtual const void * | cast (const Class &clazz) const =0 |
Protected Attributes | |
void * | buf |
the data for this packet. More... | |
int | offset |
The offset of the data for this packet. More... | |
int | length |
The length of the data for this packet. More... | |
InetAddressPtr | address |
The IP address for this packet. More... | |
int | port |
The UDP port number of the remote host. More... | |
This class represents a datagram packet.
Datagram packets are used to implement a connectionless packet delivery service. Each message is routed from one machine to another based solely on information contained within that packet. Multiple packets sent from one machine to another might be routed differently, and might arrive in any order.
log4cxx::helpers::DatagramPacket::DatagramPacket | ( | void * | buf, |
int | length | ||
) |
Constructs a DatagramPacket for receiving packets of length length
.
log4cxx::helpers::DatagramPacket::DatagramPacket | ( | void * | buf, |
int | length, | ||
InetAddressPtr | address, | ||
int | port | ||
) |
Constructs a datagram packet for sending packets of length length
to the specified port number on the specified host.
log4cxx::helpers::DatagramPacket::DatagramPacket | ( | void * | buf, |
int | offset, | ||
int | length | ||
) |
Constructs a DatagramPacket for receiving packets of length length
, specifying an offset into the buffer.
log4cxx::helpers::DatagramPacket::DatagramPacket | ( | void * | buf, |
int | offset, | ||
int | length, | ||
InetAddressPtr | address, | ||
int | port | ||
) |
Constructs a datagram packet for sending packets of length length
with offset offset
to the specified port number on the specified host.
log4cxx::helpers::DatagramPacket::~DatagramPacket | ( | ) |
|
inline |
Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.
|
inline |
Returns the data received or the data to be sent.
|
inline |
Returns the length of the data to be sent or the length of the data received.
|
inline |
Returns the offset of the data to be sent or the offset of the data received.
|
inline |
Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.
|
inline |
|
inline |
Set the data buffer for this packet.
|
inline |
Set the data buffer for this packet.
|
inline |
Set the length for this packet.
|
inline |
|
protected |
The IP address for this packet.
|
protected |
the data for this packet.
|
protected |
The length of the data for this packet.
|
protected |
The offset of the data for this packet.
|
protected |
The UDP port number of the remote host.