18#ifndef _DECAF_NET_DATAGRAMPACKET_H_
19#define _DECAF_NET_DATAGRAMPACKET_H_
43 class DatagramPacket {
46 unsigned char* buffer;
58 DatagramPacket(
const DatagramPacket& );
59 DatagramPacket& operator= (
const DatagramPacket& );
284 void setData(
unsigned char* buffer,
int size );
301 void setData(
unsigned char* buffer,
int size,
int offset,
int length );
void setSocketAddress(const SocketAddress &address)
Sets the SocketAddress (usually IP address + port number) of the remote host to which this datagram i...
DatagramPacket(unsigned char *bytes, int size, int offset, int length, const InetAddress &address, int port)
Creates a new DatagramPacket for use in sending a packet of the given length starting at the specifie...
void setLength(int length)
Set the length for this packet.
DatagramPacket(unsigned char *bytes, int size, int offset, int length, const SocketAddress &address)
Creates a new DatagramPacket for use in sending a packet of the given length starting at the specifie...
void setData(unsigned char *buffer, int size, int offset, int length)
Set the data buffer for this packet.
void setData(unsigned char *buffer, int size)
Set the data buffer for this packet.
SocketAddress * getSocketAddress() const
Gets the SocketAddress (usually IP address + port number) of the remote host that this packet is bein...
void setOffset(int offset)
Sets the offset into the data buffer where data to sent is to be read from or where the data that is ...
void setAddress(const InetAddress &address)
Sets the IP address of the machine to which this datagram is being sent.
DatagramPacket(unsigned char *bytes, int size, int length, const SocketAddress &address)
Creates a new DatagramPacket for use in sending a packet of the given length into the buffer to the s...
InetAddress * getAddress() const
unsigned char * getData() const
DatagramPacket(unsigned char *bytes, int size, int length, const InetAddress &address, int port)
Creates a new DatagramPacket for use in sending a packet of the given length to the specified host on...
DatagramPacket(unsigned char *bytes, int size, int offset, int length)
Creates a new DatagramPacket for use in receiving a packet of the given length starting at the specif...
void setPort(int port)
Sets the port number on the remote host to which this datagram is being sent.
virtual ~DatagramPacket()
DatagramPacket(unsigned char *bytes, int size, int length)
Creates a new DatagramPacket for use in receiving a packet of the given length.
Represents an IP address.
Definition InetAddress.h:33
Base class for protocol specific Socket addresses.
Definition SocketAddress.h:32
Mutex object that offers recursive support on all platforms as well as providing the ability to use t...
Definition Mutex.h:39
Definition URLStreamHandlerManager.h:26
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25