From 343d3e25a3ebba667285fd51a23c42c08a07142a Mon Sep 17 00:00:00 2001 From: Teddy Date: Sat, 31 Aug 2013 16:08:00 +0800 Subject: ptp v2.0b --- server/piztor/ptp.rst | 24 +++++++++++++++++++++++- server/piztor/ptp_send.py | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/piztor/ptp.rst b/server/piztor/ptp.rst index 6d8ff30..be63205 100644 --- a/server/piztor/ptp.rst +++ b/server/piztor/ptp.rst @@ -1,4 +1,4 @@ -Piztor Transmission Protocol v2.0a +Piztor Transmission Protocol v2.0b ---------------------------------- - Pull @@ -255,6 +255,28 @@ Piztor Transmission Protocol v2.0a - ``0x01`` for invalid token - ``0x02`` for insufficient level + - Change Password ``0x08`` + + - Request + + :: + + +-------------+-------?b-------+-------?b-------+ + | AUTH_HEAD | OLD_PASSWORD | NEW_PASSWORD | + +-------------+-----string-----+-----string-----+ + + - Response + + :: + + +--------+ + | STATUS | + +--------+ + + - ``0x00`` for success + - ``0x01`` for invalid token + - ``0x02`` for wrong password + - Push Notification - General Request diff --git a/server/piztor/ptp_send.py b/server/piztor/ptp_send.py index e910701..96f7726 100644 --- a/server/piztor/ptp_send.py +++ b/server/piztor/ptp_send.py @@ -25,7 +25,7 @@ class _SectionSize: PADDING = 1 host = "202.120.7.4" #"localhost" -port = 2224 +port = 2223 def pack_data(optcode, data): return pack("!LB", _SectionSize.LENGTH + \ -- cgit v1.2.3-70-g09d2