Commit 1282b808 authored by Levin Zimmermann's avatar Levin Zimmermann

fixup! X on msgpack support

This is a fix of 1cf2712f:
'AppendString' is the equivalent to NEO/py 'NEO' encoding, not
'AppendBytes'.
parent 9501173e
......@@ -216,7 +216,7 @@ func _handshakeServer(ctx context.Context, conn net.Conn, version uint32) (enc p
// handshake hello:
//
// - 00 00 00 <ver> for 'N' encoding, and
// - 92 c4 03 NEO ... for 'M' encoding (= msgpack of (b"NEO", <ver>))
// - 92 a3 NEO ... for 'M' encoding (= msgpack of (b"NEO", <ver>))
//
// the first byte is different from TLS handshake (0x16).
......@@ -234,9 +234,9 @@ func txHello(errctx string, conn net.Conn, version uint32, enc proto.Encoding) (
b[3] = uint8(version)
case 'M':
// (b"NEO", <V>) encoded as msgpack (= 92 c4 03 NEO int(<V>))
// (b"NEO", <V>) encoded as msgpack (= 92 a3 NEO int(<V>))
b = msgp.AppendArrayHeader(b, 2) // 92
b = msgp.AppendBytes(b, []byte("NEO")) // c4 03 NEO
b = msgp.AppendString(b, "NEO") // a3 NEO
b = msgp.AppendUint32(b, version) // u?intX version
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment