2013-10-12 15:12:47 +00:00
|
|
|
The socket protocol is intended for high performance at the expense of a
|
|
|
|
non-standardized approach. The thinking is that with http so well supported,
|
|
|
|
the socket protocol is empowered to do whatever is needed.
|
|
|
|
|
|
|
|
All data across the wire is TLV values.
|
|
|
|
|
2013-10-13 01:15:52 +00:00
|
|
|
A shorter single byte TLV variant was considered for lower overhead for things
|
|
|
|
like single character, but in every case where throughput efficiency would
|
|
|
|
matter is probably padded to 16 byte boundaries anyway due to block ciphers.
|
2013-10-12 15:12:47 +00:00
|
|
|
|
2013-10-13 01:15:52 +00:00
|
|
|
(all data has a 4 byte TLV for now)
|
|
|
|
Four byte TLs: (msb: 0b0)
|
|
|
|
Type=TL & 0b01111111000000000000000000000000 >> 24:
|
2013-10-12 15:12:47 +00:00
|
|
|
Length= TL & 0b111111111111111111111111
|
|
|
|
0: text string
|
|
|
|
1: json data
|
|
|
|
|
2013-10-13 01:15:52 +00:00
|
|
|
(msb: 0b1 is reserved), probably never to be needed
|