summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-06-18 20:18:13 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-06-18 20:18:13 +0300
commitcde8c70f8c841cf56fe4173d5249a64ceba63b42 (patch)
treeee1c74030613c442eb023b4e6fea41fd8808ac1c
parent28a8218adfa103361b9ea371eae5aa093b6d7e29 (diff)
downloadminetest-cde8c70f8c841cf56fe4173d5249a64ceba63b42.tar.gz
minetest-cde8c70f8c841cf56fe4173d5249a64ceba63b42.tar.bz2
minetest-cde8c70f8c841cf56fe4173d5249a64ceba63b42.zip
updated protocol.txt
-rw-r--r--doc/protocol.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/protocol.txt b/doc/protocol.txt
index b7b433c9e..93037e70b 100644
--- a/doc/protocol.txt
+++ b/doc/protocol.txt
@@ -25,8 +25,20 @@ Initialization:
u32 protocol_id = PROTOCOL_ID = 0x4f457403
u16 sender_peer_id = PEER_ID_INEXISTENT = 0
u8 channel = 0
+ # Reliable packet header
+ u8 type = TYPE_RELIABLE = 3
+ u16 seqnum = SEQNUM_INITIAL = 6550
# Control packet header
u8 type = TYPE_CONTROL = 0
u8 controltype = CONTROLTYPE_SET_PEER_ID = 1
u16 peer_id_new = assigned peer id to client (other than 0 or 1)
+- Then the connection can be disconnected by sending:
+ - Packet content:
+ # Basic header
+ u32 protocol_id = PROTOCOL_ID = 0x4f457403
+ u16 sender_peer_id = whatever was gotten in CONTROLTYPE_SET_PEER_ID
+ u8 channel = 0
+ # Control packet header
+ u8 type = TYPE_CONTROL = 0
+ u8 controltype = CONTROLTYPE_DISCO = 2