[email protected]:
> Thanks for the reply- information regarding the protocols can be found
> here: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
> 
> But to save time, they switched to a non-text format, as you said.
> 
> If I could code it I would :(
> 
> 2.1. Human-readable header format (Version 1)
> 
> This is the format specified in version 1 of the protocol. It consists in one
> line of US-ASCII text matching exactly the following block, sent immediately
> and at once upon the connection establishment and prepended before any data
> flowing from the sender to the receiver
> 
> 2.2. Binary header format (version 2)
> 
> Producing human-readable IPv6 addresses and parsing them is very inefficient,
> due to the multiple possible representation formats and the handling of 
> compact
> address format. It was also not possible to specify address families outside
> IPv4/IPv6 nor non-TCP protocols. Another drawback of the human-readable format
> is the fact that implementations need to parse all characters to find the
> trailing CRLF, which makes it harder to read only the exact bytes count. Last,
> the UNKNOWN address type has not always been accepted by servers as a valid
> protocol because of its imprecise meaning.

Right, they made it more complicated, because they could not bother
to use standard library functions to parse strings. At least I hope
they use network byte order, instead of something that happens to
work on X86.

        Wietse

Reply via email to