-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Adam edited this page Feb 12, 2015
·
13 revisions
Welcome to the cnt5106c wiki!
The handshake consists of three parts: handshake header, zero bits, and peer ID. The length of the handshake message is 32 bytes. The handshake header is 18-byte string ‘P2PFILESHARINGPROJ’, which is followed by 10-byte zero bits, which is followed by 4-byte peer ID which is the integer representation of the peer ID. handshake header zero bits peer ID
After handshaking, each peer can send a stream of actual messages. An actual message consists of
- 4-byte message length field
- 1-byte message type
- a message payload with variable size