#include <DatagramPacket.h>
List of all members.
Detailed Description
Datagram packets are used to implement connectionless packet delivery service using IP sockets. It contains a internal data buffer which can be accessed and directly manipulated by getData().
Constructor & Destructor Documentation
| TDatagramPacket::TDatagramPacket |
( |
) |
|
Creates a new datagram packet. By default an array of 128 bytes is allocated.
| TDatagramPacket::TDatagramPacket |
( |
Int |
iSize ) |
|
Creates a new datagram packet of a different size.
- Parameters:
-
| iSize | : Size of the datagram packet |
| TDatagramPacket::TDatagramPacket |
( |
const TByteArray & |
rData ) |
|
Creates a new datagram packet of a different size.
- Parameters:
-
| TDatagramPacket::TDatagramPacket |
( |
const TString & |
rTargetAddress, |
|
|
Uint |
uiPort, |
|
|
Int |
iSize = 128 |
|
) |
| |
Creates a new datagram packet. Besides the size also the address of the remote system can be direcly set.
- Parameters:
-
| rTargetAddress | : Receiver of the package |
| uiPort | : Receiver port |
| iSize | : Size of the datagram packet |
| TDatagramPacket::~TDatagramPacket |
( |
) |
[virtual] |
Member Function Documentation
| Retval TDatagramPacket::getAddress |
( |
TIPAddress *& |
rpAddress ) |
const |
gets the address of the remote host that this packet is being sent to or is coming from.
- Parameters:
-
| rpAddress | : return parameter of the address |
- Return values:
-
| RET_NOERROR | : Address returned |
| RET_REQUEST_FAILED,: | No address is set |
| char * zeus::TDatagramPacket::getData |
( |
) |
[inline] |
returns the data. Using this method data can be accessed and manipulated directly. Be sure to meet the array boundaries of the data.
| const char * zeus::TDatagramPacket::getData |
( |
) |
const [inline] |
returns the data for read only purposes.
| Int zeus::TDatagramPacket::getDataSize |
( |
) |
const [inline] |
| void TDatagramPacket::setAddress |
( |
const TString & |
rTargetAddress, |
|
|
Uint |
uiPort |
|
) |
| |
sets the address of the remote host to which this datagram is being sent.
- Parameters:
-
| rTargetAddress | : host address |
| uiPort | : port |
| void TDatagramPacket::setAddress |
( |
TIPAddress & |
rAddress ) |
|
sets the address of the remote host to which this datagram is being sent.
- Parameters:
-
| void TDatagramPacket::setData |
( |
const TByteArray & |
rData ) |
|
sets the data of the messages. Using this method a message can be reused with modified or different data body
The documentation for this class was generated from the following files: