#include <PacketProtocol.h> [code]
Inherited by Protocols::BitTorrent::Packets::PacketProtocol.
Inheritance diagram for Protocols::Generics::PacketProtocol:

A concrete protocol could implement this interface to describe the format of its binary packets on the wire by means of the lengths of the three basic packet parts - header, payload and trailer. We assume that:
Definition at line 44 of file PacketProtocol.h.
Public Member Functions | |
| virtual | ~PacketProtocol () |
| virtual int | headerLength () const =0 |
| Returns the length of a packet header. | |
| virtual int | payloadLength (const QByteArray &header) const =0 |
| Extracts the payload length from header. | |
| virtual Packet | createPacket (const QByteArray &header, const QByteArray &payload) const =0 |
|
|
Definition at line 49 of file PacketProtocol.h. |
|
||||||||||||
|
Implemented in Protocols::BitTorrent::Packets::PacketProtocol. |
|
|
Returns the length of a packet header.
Implemented in Protocols::BitTorrent::Packets::PacketProtocol. |
|
|
Extracts the payload length from header.
Implemented in Protocols::BitTorrent::Packets::PacketProtocol. |