Apache Log4cxx  Version 1.2.0
Loading...
Searching...
No Matches
log4cxx::helpers::DatagramPacket Class Reference

This class represents a datagram packet. More...

#include <datagrampacket.h>

Inheritance diagram for log4cxx::helpers::DatagramPacket:
log4cxx::helpers::Object

Public Member Functions

 DatagramPacket (void *buf, int length)
 Constructs a DatagramPacket for receiving packets of length length.
 
 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.
 
 DatagramPacket (void *buf, int offset, int length)
 Constructs a DatagramPacket for receiving packets of length length, specifying an offset into the buffer.
 
 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.
 
 ~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.
 
void * getData () const
 Returns the data received or the data to be sent.
 
int getLength () const
 Returns the length of the data to be sent or the length of the data received.
 
int getOffset () const
 Returns the offset of the data to be sent or the offset of the data received.
 
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.
 
void setAddress (InetAddressPtr address1)
 
void setData (void *buf1)
 Set the data buffer for this packet.
 
void setData (void *buf1, int offset1, int length1)
 Set the data buffer for this packet.
 
void setLength (int length1)
 Set the length for this packet.
 
void setPort (int port1)
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual const helpers::ClassgetClass () const =0
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DatagramPacket() [1/4]

log4cxx::helpers::DatagramPacket::DatagramPacket ( void *  buf,
int  length 
)

Constructs a DatagramPacket for receiving packets of length length.

◆ DatagramPacket() [2/4]

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.

◆ DatagramPacket() [3/4]

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.

◆ DatagramPacket() [4/4]

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.

◆ ~DatagramPacket()

log4cxx::helpers::DatagramPacket::~DatagramPacket ( )

Member Function Documentation

◆ getAddress()

InetAddressPtr log4cxx::helpers::DatagramPacket::getAddress ( ) const

Returns the IP address of the machine to which this datagram is being sent or from which the datagram was received.

◆ getData()

void * log4cxx::helpers::DatagramPacket::getData ( ) const

Returns the data received or the data to be sent.

◆ getLength()

int log4cxx::helpers::DatagramPacket::getLength ( ) const

Returns the length of the data to be sent or the length of the data received.

◆ getOffset()

int log4cxx::helpers::DatagramPacket::getOffset ( ) const

Returns the offset of the data to be sent or the offset of the data received.

◆ getPort()

int log4cxx::helpers::DatagramPacket::getPort ( ) const

Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received.

◆ setAddress()

void log4cxx::helpers::DatagramPacket::setAddress ( InetAddressPtr  address1)

◆ setData() [1/2]

void log4cxx::helpers::DatagramPacket::setData ( void *  buf1)

Set the data buffer for this packet.

◆ setData() [2/2]

void log4cxx::helpers::DatagramPacket::setData ( void *  buf1,
int  offset1,
int  length1 
)

Set the data buffer for this packet.

◆ setLength()

void log4cxx::helpers::DatagramPacket::setLength ( int  length1)

Set the length for this packet.

◆ setPort()

void log4cxx::helpers::DatagramPacket::setPort ( int  port1)

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