diff options
author | m0sia <m0sia@m0sia.ru> | 2016-02-18 15:04:42 -0600 |
---|---|---|
committer | m0sia <m0sia@m0sia.ru> | 2016-02-18 15:04:42 -0600 |
commit | 52c1c1f9d06631b94c3b8ce8eaf816c5a36842b3 (patch) | |
tree | 020f823cf692d1ce6898649a15c7633c831dd972 /ParrotProtocol.py | |
parent | f57d9a8d4ebc30effbec71382cce7e0a37b697e3 (diff) | |
parent | 92e47683fc783a2dbd3d9737af40eb0b3372af61 (diff) | |
download | pyParrotZikTCP-52c1c1f9d06631b94c3b8ce8eaf816c5a36842b3.tar.xz pyParrotZikTCP-52c1c1f9d06631b94c3b8ce8eaf816c5a36842b3.zip |
Merge pull request #12 from serathius/master
Rework and Zik 2.0 implementation.
Diffstat (limited to 'ParrotProtocol.py')
-rw-r--r-- | ParrotProtocol.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/ParrotProtocol.py b/ParrotProtocol.py deleted file mode 100644 index 9324b8b..0000000 --- a/ParrotProtocol.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python - -def generateRequest(requestString): - message=bytearray() - message.extend(generateHeader(requestString)) - message.extend(bytearray(requestString)) - return message - -def generateHeader(requestString): - header = bytearray([0]) - header.append(len(requestString)+3) - header.append("\x80") - return header - -def getRequest(apiString): - return generateRequest("GET "+apiString) - -def setRequest(apiString,args): - return generateRequest("SET "+apiString+"?arg="+args)
\ No newline at end of file |