#include <UdpConnection.h> [code]
Inherits Protocols::Transports::Connection.
Inheritance diagram for Protocols::Transports::UdpConnection:


This class can be used when you want to transmit packets over UDP. You get unreliable connection-oriented data transport. This class in conjunction with UdpSwitch constitute a thin wrapper around QUdpSocket.
To increase the chance that a UDP packet actually gets delivered, you should not send UDP packets of size bigger that the smalles MTU of any Internet router on your packets' path. No path MTU discovery is currently implemented. To be on the safe side try not to use data packets bigger than 512 bytes.
UdpConnection will buffer incomming data to let UdpSwitch read further packets for other UdpConnection objects.
Definition at line 79 of file UdpConnection.h.
Public Member Functions | |
| UdpConnection (UdpSwitch *udpSwitch) | |
| ~UdpConnection () | |
Protected Member Functions | |
| void | doConnectToNode (const NodeAddress &) |
| void | doDisconnectFromNode () |
| qint64 | readData (char *data, qint64 maxSize) |
| qint64 | writeData (const char *data, qint64 maxSize) |
Private Member Functions | |
| UdpConnection (const UdpConnection &) | |
| UdpConnection & | operator= (const UdpConnection &) |
| void | datagramRead (const QByteArray &datagram) |
| void | datagramWritten () |
Private Attributes | |
| auto_ptr< UdpConnectionPrivate > | p |
Friends | |
| class | UdpSwitch |
|
|
|
|
|
Definition at line 52 of file UdpConnection.cpp. |
|
|
Definition at line 58 of file UdpConnection.cpp. |
|
|
Definition at line 85 of file UdpConnection.cpp. |
|
|
|
|
|
Implements Protocols::Transports::Connection. Definition at line 63 of file UdpConnection.cpp. |
|
|
Implements Protocols::Transports::Connection. Definition at line 77 of file UdpConnection.cpp. |
|
|
|
|
||||||||||||
|
Implements Protocols::Transports::Connection. Definition at line 91 of file UdpConnection.cpp. |
|
||||||||||||
|
Implements Protocols::Transports::Connection. Definition at line 113 of file UdpConnection.cpp. |
|
|
Definition at line 101 of file UdpConnection.h. |
|
|
Reimplemented from Protocols::Transports::Connection. Definition at line 99 of file UdpConnection.h. |