Previously if we connected to the wrong service we would output a confusing set of error messages.
Previously if the connection returned EOF (e.g. because it was forwarded by something like docker run -p) we would also output a confusing set of error messages.
This patch makes the constructor NewMultiplexer return an error, which is the result of a handshake exchange. This means that NewMultiplexer is now a blocking operation.
Previously if we connected to the wrong service we would output a confusing set of error messages.
Previously if the connection returned EOF (e.g. because it was forwarded by something like
docker run -p
) we would also output a confusing set of error messages.This patch makes the constructor
NewMultiplexer
return an error, which is the result of a handshake exchange. This means thatNewMultiplexer
is now a blocking operation.The handshake contains the magic string
so hopefully it will be obvious to other people what this protocol is.
For future use the handshake includes a variable length payload which could contain feature flags in the future.
Signed-off-by: David Scott dave.scott@docker.com