Protocols::Generics Namespace Reference


Classes

class  BadPacket
 A packet class encapsulating the raw data of a packet that cannot be parsed. More...
class  Buffer
 Interface Buffer. More...
class  Connection
 Interface Connection. More...
class  DataBase
 Abstract protocol data exchanged between parties. More...
class  DataQueue
 Interface DataQueue - Data queueing strategy. More...
class  DataSerializer
 Interface DataSerializer - read and write Data to and from Transport. More...
class  FifoQueue
class  GenericSession
 A generic Data exchange Session over a Transport. More...
class  IpResolvingTransportFactory
 A TransportFactory that performs host name lookup if necessary. More...
class  NameResolver
 Interface NameResolver - used to perform hostname lookups. More...
class  NameResolverStatus
 Status interface for NameResolver - reports the results of name lookups. More...
class  PacketBase
 An abstract base class representing a generic packet. More...
class  PacketFactory
 Extracts and creates objects of Packet derived classes from raw bytes. More...
class  PacketProtocol
 Interface describing the binary format of packets. More...
class  PacketSerializer
 Serializes Packet objects to and from Transport. More...
class  QtNameResolver
class  RawData
 A very generic DataBase implementation - represents a bunch of raw bytes. More...
class  Session
 Interface Session - Data objects exchange over a Transport. More...
class  SessionStatus
 Interface SessionStatus - Session notifications listener. More...
class  Socket
class  SocketBuffer
 Interface for a buffer, which SocketTransport could use. More...
class  SocketStatus
class  SocketTransport
 Implements the Transport interface on top of Socket and SocketBuffer. More...
class  TcpSocket
 A thin wrapper around QTcpSocket. More...
class  TcpSocketBuffer
 Interface for a buffer, which SocketTransport could use. More...
class  TcpTransport
class  TcpTransportFactory
class  Transport
 Interface for a low-level transport protocol. More...
class  TransportFactory
class  TransportFactoryStatus
class  TransportStatus
 Interface TransportStatus - status notifications for Transport. More...

Namespaces

namespace  Testing

Typedefs

typedef AbstractValue< DataBase,
RawData
Data
 Protocol data exchanged between parties.
typedef AbstractValue< PacketBase,
BadPacket, DataBase
Packet
 PacketBase Value Object wrapper.


Typedef Documentation

typedef AbstractValue<DataBase, RawData> Protocols::Generics::Data
 

Protocol data exchanged between parties.

Data encapsulates a logical (in regard to a communication protocol) piece of data that communicating parties could exchange. The concrete protocol data object will be an instance of a class derived from DataBase. A DataBase reference to the encapsulated object is returned by object(). This reference could be casted to access the data fields of the object.

Definition at line 41 of file Data.h.

typedef AbstractValue<PacketBase, BadPacket, DataBase> Protocols::Generics::Packet
 

PacketBase Value Object wrapper.

Check the docs of AbstractValue for a description of the underlying concept.

Todo:
There was the idea to define Packet for each protocol. The problem was that that would require each protocol to also define a BadPacket or NullPacket class. If the one from Generics (i.e. here) is used, then there might be a problem at runtime - casting BadPacket which is derived from Generics::PacketBase to DataBase (that's fine) and then casing is to e.g. BitTorrent::Packets::PacketBase, which is unrelated to BadPacket! How to solve that?

Definition at line 45 of file Packet.h.