updated protocol.txt
authorPerttu Ahola <celeron55@gmail.com>
Sat, 18 Jun 2011 17:18:13 +0000 (20:18 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 18 Jun 2011 17:18:13 +0000 (20:18 +0300)
doc/protocol.txt

index b7b433c9eb3639b2ebef277df3b0f7a34bff442b..93037e70b637ec2075d76992bd42e903e94f6349 100644 (file)
@@ -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