.TH "KNetwork::KDatagramPacket" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KNetwork::KDatagramPacket \- one datagram  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdatagramsocket.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDatagramPacket\fP ()"
.br
.ti -1c
.RI "\fBKDatagramPacket\fP (const \fBQByteArray\fP &content)"
.br
.ti -1c
.RI "\fBKDatagramPacket\fP (const char *content, uint length)"
.br
.ti -1c
.RI "\fBKDatagramPacket\fP (const \fBQByteArray\fP &content, const \fBKSocketAddress\fP &addr)"
.br
.ti -1c
.RI "\fBKDatagramPacket\fP (const char *content, uint length, const \fBKSocketAddress\fP &addr)"
.br
.ti -1c
.RI "\fBKDatagramPacket\fP (const \fBKDatagramPacket\fP &other)"
.br
.ti -1c
.RI "\fB~KDatagramPacket\fP ()"
.br
.ti -1c
.RI "const \fBQByteArray\fP & \fBdata\fP () const "
.br
.ti -1c
.RI "uint \fBlength\fP () const "
.br
.ti -1c
.RI "uint \fBsize\fP () const "
.br
.ti -1c
.RI "bool \fBisEmpty\fP () const "
.br
.ti -1c
.RI "bool \fBisNull\fP () const "
.br
.ti -1c
.RI "const \fBKSocketAddress\fP & \fBaddress\fP () const "
.br
.ti -1c
.RI "void \fBsetAddress\fP (const \fBKSocketAddress\fP &addr)"
.br
.ti -1c
.RI "void \fBdetach\fP ()"
.br
.ti -1c
.RI "void \fBsetData\fP (const \fBQByteArray\fP &data)"
.br
.ti -1c
.RI "void \fBsetData\fP (const char *data, uint length)"
.br
.in -1c
.SH "Detailed Description"
.PP 
one datagram 

This object represents one datagram of data sent or received through a datagram socket (as \fBKDatagramSocket\fP or derived classes). A datagram consists of data as well as a network address associated (whither to send the data or whence it came).
.PP
This is a lightweight class. Data is stored in a \fBQByteArray\fP, which means that it is explicitly shared.
.PP
\fBAuthor:\fP
.RS 4
Thiago Macieira <thiago.macieira@kdemail.net> 
.RE
.PP

.PP
Definition at line 51 of file kdatagramsocket.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KNetwork::KDatagramPacket::KDatagramPacket ()\fC [inline]\fP"
.PP
Default constructor. 
.PP
Definition at line 60 of file kdatagramsocket.h.
.SS "KNetwork::KDatagramPacket::KDatagramPacket (const \fBQByteArray\fP & content)\fC [inline]\fP"
.PP
Constructs the datagram with the specified content. 
.PP
Definition at line 66 of file kdatagramsocket.h.
.SS "KNetwork::KDatagramPacket::KDatagramPacket (const char * content, uint length)\fC [inline]\fP"
.PP
Constructs the datagram with the specified content. 
.PP
\fBSee also:\fP
.RS 4
\fBsetData\fP for information on \fBdata\fP sharing. 
.RE
.PP

.PP
Definition at line 75 of file kdatagramsocket.h.
.SS "KNetwork::KDatagramPacket::KDatagramPacket (const \fBQByteArray\fP & content, const \fBKSocketAddress\fP & addr)\fC [inline]\fP"
.PP
Constructs the datagram with the specified content and address. 
.PP
Definition at line 81 of file kdatagramsocket.h.
.SS "KNetwork::KDatagramPacket::KDatagramPacket (const char * content, uint length, const \fBKSocketAddress\fP & addr)\fC [inline]\fP"
.PP
Constructs the datagram with the specified content and address. 
.PP
Definition at line 88 of file kdatagramsocket.h.
.SS "KNetwork::KDatagramPacket::KDatagramPacket (const \fBKDatagramPacket\fP & other)\fC [inline]\fP"
.PP
Copy constructor. 
.PP
Note that data is explicitly shared. 
.PP
Definition at line 95 of file kdatagramsocket.h.
.SS "KNetwork::KDatagramPacket::~\fBKDatagramPacket\fP ()\fC [inline]\fP"
.PP
Destructor. 
.PP
Non-virtual. 
.PP
Definition at line 101 of file kdatagramsocket.h.
.SH "Member Function Documentation"
.PP 
.SS "const \fBQByteArray\fP& KNetwork::KDatagramPacket::data () const\fC [inline]\fP"
.PP
Returns the data. 
.PP
Definition at line 107 of file kdatagramsocket.h.
.SS "uint KNetwork::KDatagramPacket::length () const\fC [inline]\fP"
.PP
Returns the data length. 
.PP
Definition at line 113 of file kdatagramsocket.h.
.SS "uint KNetwork::KDatagramPacket::size () const\fC [inline]\fP"
.PP
Returns the data length. 
.PP
Definition at line 119 of file kdatagramsocket.h.
.SS "bool KNetwork::KDatagramPacket::isEmpty () const\fC [inline]\fP"
.PP
Returns true if this object is empty. 
.PP
Definition at line 125 of file kdatagramsocket.h.
.SS "bool KNetwork::KDatagramPacket::isNull () const\fC [inline]\fP"
.PP
Returns true if this object is null. 
.PP
Definition at line 131 of file kdatagramsocket.h.
.SS "const \fBKSocketAddress\fP& KNetwork::KDatagramPacket::address () const\fC [inline]\fP"
.PP
Returns the socket address. 
.PP
Definition at line 137 of file kdatagramsocket.h.
.SS "void KNetwork::KDatagramPacket::setAddress (const \fBKSocketAddress\fP & addr)\fC [inline]\fP"
.PP
Sets the address stored to the given value. 
.PP
Definition at line 143 of file kdatagramsocket.h.
.SS "void KNetwork::KDatagramPacket::detach ()\fC [inline]\fP"
.PP
Detaches our data from a shared pool. 
.PP
\fBSee also:\fP
.RS 4
QByteArray::detach 
.RE
.PP

.PP
Definition at line 150 of file kdatagramsocket.h.
.SS "void KNetwork::KDatagramPacket::setData (const \fBQByteArray\fP & data)\fC [inline]\fP"
.PP
Sets the data to the given value. 
.PP
Data is explicitly shared. 
.PP
Definition at line 156 of file kdatagramsocket.h.
.SS "void KNetwork::KDatagramPacket::setData (const char * data, uint length)\fC [inline]\fP"
.PP
Sets the data to the given buffer and size. 
.PP
Definition at line 162 of file kdatagramsocket.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
