I have the two following functions for sending and receiving packets.
void send(std::string protocol)
{
char *request=new char[protocol.size()+1];
re
Typically a communication protocol either uses fixed length messages or messages that contain header that tells the length of message.
Boost.Asio online documentation contains large set of examples and tutorials so you should perhaps start from there. Wikipedia is good source for explaining data transmission terminology, boost asio documentation does not do it.