frnetlib/include/frnetlib/Packetable.h
Fred Nicolson 6b1ef27764 Re-wrote HTML request/response parsing
It's now much more robust, supports requests received over multiple recvs. Supports POST variables. Supports 'content-length' header.
2017-04-10 17:24:57 +01:00

35 lines
731 B
C++

//
// Created by fred on 02/02/17.
//
#ifndef FRNETLIB_PACKETABLE_H
#define FRNETLIB_PACKETABLE_H
#include <string>
namespace fr
{
class Packet;
class Packetable
{
public:
virtual ~Packetable() = default;
/*!
* Called to pack class data into the 'destination'
* packet.
*
* @param destination Where you should store the class data
*/
virtual void pack(fr::Packet &destination) const=0;
/*!
* Called to unpack class data from the 'source' packet.
*
* @param source Where to retreive the class data from.
*/
virtual void unpack(fr::Packet &source)=0;
};
}
#endif //FRNETLIB_PACKETABLE_H