#include <TcpPortPacket.h> [code]
Inherits Protocols::Kad::Packets::Packet.
Inheritance diagram for Protocols::Kad::Packets::TcpPortPacket< type >:


This template class can be used by all packets which have a 2 bytes tcp port payload. The only template argument is a PacketType value. These packets will never be compressed, so they will always have ProtocolType equal to KadProtocol.
Definition at line 41 of file TcpPortPacket.h.
Public Member Functions | |
| virtual QString | name () const |
| Returns the name of the Kad packet type. | |
| virtual TcpPortPacket * | copy () const |
| Implements the virtual copy constructor. | |
| TcpPortPacket () | |
| Default constructor. | |
Protected Types | |
| enum | Constants { PayloadLength = 2 } |
Protected Member Functions | |
| virtual void | readPayload (BinaryReader &) |
| Reads the payload fields from a BinaryReader object. | |
| virtual void | writePayload (BinaryWriter &) const |
| Writes the payload fields in a BinaryWriter. | |
| Q_DECLARE_SHARED_DATA (Data) | |
Static Private Attributes | |
| static const QString | name_ |
| Needed by name(). Each template specialization must define a value. | |
Classes | |
| class | Data |
| TcpPort packet's private data. More... | |
|
|||||
|
Definition at line 53 of file TcpPortPacket.h. |
|
|||||||||
|
Default constructor. Simply calls the ctor of the base by passing a newly created object of the base's private data Data and the packet type, which is the template argu- ment value. Definition at line 102 of file TcpPortPacket.h. |
|
|||||||||
|
Implements the virtual copy constructor.
Implements Protocols::Kad::Packets::Packet. Definition at line 90 of file TcpPortPacket.h. |
|
|||||||||
|
Returns the name of the Kad packet type.
Implements Protocols::Kad::Packets::Packet. Definition at line 83 of file TcpPortPacket.h. |
|
||||||||||
|
|
|
||||||||||
|
Reads the payload fields from a BinaryReader object. Reads the field tcpPort as a 2 byte integer. Implements Protocols::Kad::Packets::Packet. Definition at line 112 of file TcpPortPacket.h. |
|
||||||||||
|
Writes the payload fields in a BinaryWriter. Writes the payload field tcpPort as a 2 bytes unsigned integer. Implements Protocols::Kad::Packets::Packet. Definition at line 123 of file TcpPortPacket.h. |
|
|||||
|
Needed by name(). Each template specialization must define a value.
Definition at line 74 of file TcpPortPacket.h. |