#include <kdatagramsocket.h>
Public Member Functions | |
KDatagramPacket () | |
KDatagramPacket (const TQByteArray &content) | |
KDatagramPacket (const char *content, uint length) | |
KDatagramPacket (const TQByteArray &content, const TDESocketAddress &addr) | |
KDatagramPacket (const char *content, uint length, const TDESocketAddress &addr) | |
KDatagramPacket (const KDatagramPacket &other) | |
~KDatagramPacket () | |
const TQByteArray & | data () const |
uint | length () const |
uint | size () const |
bool | isEmpty () const |
bool | isNull () const |
const TDESocketAddress & | address () const |
void | setAddress (const TDESocketAddress &addr) |
void | detach () |
void | setData (const TQByteArray &data) |
void | setData (const char *data, uint length) |
Detailed Description
one datagram
This object represents one datagram of data sent or received through a datagram socket (as KDatagramSocket or derived classes). A datagram consists of data as well as a network address associated (whither to send the data or whence it came).
This is a lightweight class. Data is stored in a TQByteArray, which means that it is explicitly shared.
Definition at line 51 of file kdatagramsocket.h.
Constructor & Destructor Documentation
◆ KDatagramPacket() [1/6]
|
inline |
Default constructor.
Definition at line 60 of file kdatagramsocket.h.
◆ KDatagramPacket() [2/6]
|
inline |
Constructs the datagram with the specified content.
Definition at line 66 of file kdatagramsocket.h.
◆ KDatagramPacket() [3/6]
|
inline |
Constructs the datagram with the specified content.
Definition at line 75 of file kdatagramsocket.h.
◆ KDatagramPacket() [4/6]
|
inline |
Constructs the datagram with the specified content and address.
Definition at line 81 of file kdatagramsocket.h.
◆ KDatagramPacket() [5/6]
|
inline |
Constructs the datagram with the specified content and address.
Definition at line 88 of file kdatagramsocket.h.
◆ KDatagramPacket() [6/6]
|
inline |
Copy constructor.
Note that data is explicitly shared.
Definition at line 95 of file kdatagramsocket.h.
◆ ~KDatagramPacket()
|
inline |
Member Function Documentation
◆ address()
|
inline |
Returns the socket address.
Definition at line 137 of file kdatagramsocket.h.
◆ data()
|
inline |
Returns the data.
Definition at line 107 of file kdatagramsocket.h.
◆ detach()
|
inline |
Detaches our data from a shared pool.
- See also
- TQByteArray::detach
Definition at line 150 of file kdatagramsocket.h.
◆ isEmpty()
|
inline |
Returns true if this object is empty.
Definition at line 125 of file kdatagramsocket.h.
◆ isNull()
|
inline |
Returns true if this object is null.
Definition at line 131 of file kdatagramsocket.h.
◆ length()
|
inline |
Returns the data length.
Definition at line 113 of file kdatagramsocket.h.
◆ setAddress()
|
inline |
Sets the address stored to the given value.
Definition at line 143 of file kdatagramsocket.h.
◆ setData() [1/2]
|
inline |
Sets the data to the given buffer and size.
Definition at line 162 of file kdatagramsocket.h.
◆ setData() [2/2]
|
inline |
Sets the data to the given value.
Data is explicitly shared.
Definition at line 156 of file kdatagramsocket.h.
◆ size()
|
inline |
Returns the data length.
Definition at line 119 of file kdatagramsocket.h.
The documentation for this class was generated from the following file: