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


This template class is used by several packets whose payload consists of a peer information. 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 PeerInfoPacket.h.
Public Member Functions | |
| virtual QString | name () const |
| Returns the name of the Kad packet type. | |
| virtual PeerInfoPacket * | copy () const |
| Implements the virtual copy constructor. | |
| PeerInfoPacket () | |
| Default constructor. | |
Protected Types | |
| enum | Constants { PayloadLength = 25 } |
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 |
| PeerInfoPacket's private data. More... | |
|
|||||
|
Definition at line 53 of file PeerInfoPacket.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 106 of file PeerInfoPacket.h. |
|
|||||||||
|
Implements the virtual copy constructor.
Implements Protocols::Kad::Packets::Packet. Definition at line 94 of file PeerInfoPacket.h. |
|
|||||||||
|
Returns the name of the Kad packet type.
Implements Protocols::Kad::Packets::Packet. Definition at line 87 of file PeerInfoPacket.h. |
|
||||||||||
|
|
|
||||||||||
|
Reads the payload fields from a BinaryReader object. Reads all the fields which form the peer information.
Implements Protocols::Kad::Packets::Packet. Definition at line 119 of file PeerInfoPacket.h. |
|
||||||||||
|
Writes the payload fields in a BinaryWriter.
Implements Protocols::Kad::Packets::Packet. Definition at line 133 of file PeerInfoPacket.h. |
|
|||||
|
Needed by name(). Each template specialization must define a value.
Definition at line 78 of file PeerInfoPacket.h. |