Commit c3fb22a4 authored by Kirill Smelkov's avatar Kirill Smelkov

X move handshake do to neonet

parent fad6baf1
......@@ -185,6 +185,13 @@ func _handshakeServer(ctx context.Context, conn net.Conn, version uint32) (enc p
return peerEnc, rxbuf, nil
}
// handshake hello:
//
// - 00 00 00 <ver> for 'N' encoding, and
// - 92 c4 03 NEO ... for 'M' encoding (= msgpack of (b"NEO", <ver>))
//
// the first byte is different from TLS handshake (0x16).
func txHello(errctx string, conn net.Conn, version uint32, enc proto.Encoding) (err error) {
defer xerr.Context(&err, errctx)
......
......@@ -76,8 +76,7 @@ import (
const (
// The protocol version must be increased whenever upgrading a node may require
// to upgrade other nodes. It is encoded as a 4-bytes big-endian integer and
// the high order byte 0 is different from TLS Handshake (0x16). XXX update for msgpack
// to upgrade other nodes.
Version = 6
// length of packet header in 'N'-encoding
......
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