Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
c3fb22a4
Commit
c3fb22a4
authored
4 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X move handshake do to neonet
parent
fad6baf1
t2
t
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
go/neo/neonet/newlink.go
go/neo/neonet/newlink.go
+7
-0
go/neo/proto/proto.go
go/neo/proto/proto.go
+1
-2
No files found.
go/neo/neonet/newlink.go
View file @
c3fb22a4
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
go/neo/proto/proto.go
View file @
c3fb22a4
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment