Processing data from a TCP socket - Programming On Unix

Users browsing this thread: 1 Guest(s)
venam
Administrators
You could use the structure you have at the moment adding an extra field at the beginning for the number of fields.
It could be just a byte so it's small enough and the server can always unpack the first byte and know that's the number of fields to decode next.

Other than that there are other stuffs like ASN.1 and some TLV. However, those are more generic way of sending structure and thus they might be heavier than predefined static fields.


Messages In This Thread
Processing data from a TCP socket - by z3bra - 22-08-2016, 07:12 PM
RE: Processing data from a TCP socket - by venam - 23-08-2016, 12:34 AM
RE: Processing data from a TCP socket - by z3bra - 23-08-2016, 04:21 AM
RE: Processing data from a TCP socket - by venam - 23-08-2016, 04:30 AM
RE: Processing data from a TCP socket - by z3bra - 23-08-2016, 04:53 AM
RE: Processing data from a TCP socket - by venam - 23-08-2016, 05:58 AM
RE: Processing data from a TCP socket - by z3bra - 23-08-2016, 08:51 AM
RE: Processing data from a TCP socket - by z3bra - 23-08-2016, 01:50 PM
RE: Processing data from a TCP socket - by z3bra - 23-08-2016, 07:22 PM
RE: Processing data from a TCP socket - by z3bra - 24-08-2016, 04:11 AM
RE: Processing data from a TCP socket - by apk - 24-08-2016, 11:33 AM