-
Notifications
You must be signed in to change notification settings - Fork 27
CAbstractPacketParser
Takashiro edited this page Aug 20, 2015
·
1 revision
The CAbstractPacketParser defines the basic functionality of a packet parser, which converts structural data, i.e, CPacket into string representations so as to be transfered via sockets and string representations into CPacket objects. CAbstractPacketParser is the base class for CJsonPacketParser. You may implement your own parser by inheriting CAbstractPacketParser and apply it to CPacketRouter.
CAbstractPacketParser();
virtual ~CAbstractPacketParser();
virtual CPacket parse(const QByteArray &data) = 0;
virtual QByteArray parse(const CPacket &packet) = 0;
Create a new abstract packet parser.
Destroys a packet parser.
Converts a raw string representation into a CPacket.
Converts a CPacket into a string representation.