summaryrefslogtreecommitdiff
path: root/server/ptp.rst
diff options
context:
space:
mode:
authorTeddy <[email protected]>2013-08-23 09:48:11 +0800
committerTeddy <[email protected]>2013-08-23 09:48:11 +0800
commitdd0fe5add36e910e07d5ab29b888859c1b569a0b (patch)
treef1b3539eeaa865d1caa0dfb9d044d8815b3efd80 /server/ptp.rst
parentd622bf0bd855f4d2f0600a52aba1faa015f91ac6 (diff)
more specific ptp
Diffstat (limited to 'server/ptp.rst')
-rw-r--r--server/ptp.rst39
1 files changed, 27 insertions, 12 deletions
diff --git a/server/ptp.rst b/server/ptp.rst
index 741e41e..dc2f672 100644
--- a/server/ptp.rst
+++ b/server/ptp.rst
@@ -33,9 +33,14 @@ Piztor Transmission Protocol v0.1
::
- +--1b---+-----4b-----+---1b---+
- | 0x00 | USER_TOKEN | STATUS |
- +-uchar-+-----int----+--uchar-+
+ +--1b---+-----4b-----+---1b----+
+ | 0x00 | USER_TOKEN | STATUS |
+ +-uchar-+-----int----+--uchar--+
+
+ STATUS:
+
+ - 0x00 for success
+ - 0x01 for already logged in (kicked another online device)
- Message Sending
@@ -43,17 +48,22 @@ Piztor Transmission Protocol v0.1
::
- +--1b---+------4b------+------4b-----+
- | 0x01 | SENDER_TOKEN | RECEIVER_ID |
- +-uchar-+------int-----+-----int-----+
+ +--1b---+------4b------+------4b-----+-----?b-----+
+ | 0x01 | SENDER_TOKEN | RECEIVER_ID | MSG_BODY |
+ +-uchar-+------int-----+-----int-----+------------+
- Response
::
- +--1b---+----?b----+
- | 0x01 | RESERVED |
- +-uchar-+----------+
+ +--1b---+---1b---+
+ | 0x01 | STATUS |
+ +-uchar-+--uchar-+
+
+ STATUS:
+
+ - 0x00 for success
+ - 0x01 for invalid token
- Location Update
@@ -69,9 +79,14 @@ Piztor Transmission Protocol v0.1
::
- +--1b---+----?b----+
- | 0x02 | RESERVED |
- +-uchar-+----------+
+ +--1b---+---1b---+
+ | 0x01 | STATUS |
+ +-uchar-+--uchar-+
+
+ STATUS:
+
+ - 0x00 for success
+ - 0x01 for invalid token
- Location Information