Packeteer
Packeteer is a library that can handle structurally organising protocol packets like HTTP 1.x requests and responses as well as generating, structuring, unpacking and potentially more features depending on the protocol.
Supported protocols
HTTP/1.x
What Packeteer is not
a TCP/UDP stream handling library
a server
a protocol client
the only way to do this, probably