aboutsummaryrefslogtreecommitdiff
path: root/ParrotProtocol.py
diff options
context:
space:
mode:
authorMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 00:13:44 +0200
committerMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 00:13:44 +0200
commite130a18d3c46f311d095819ab901b2fca57fcea3 (patch)
treefce9b549ace62d6085a65c584642f466f0ca17d9 /ParrotProtocol.py
parent46123a0a78149a8832e9201f33de3a8dfa520c4b (diff)
downloadpyParrotZikTCP-e130a18d3c46f311d095819ab901b2fca57fcea3.tar.xz
pyParrotZikTCP-e130a18d3c46f311d095819ab901b2fca57fcea3.zip
Create message class.
Diffstat (limited to '')
-rw-r--r--ParrotProtocol.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/ParrotProtocol.py b/ParrotProtocol.py
deleted file mode 100644
index a4e1677..0000000
--- a/ParrotProtocol.py
+++ /dev/null
@@ -1,20 +0,0 @@
-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(resource):
- return generateRequest("GET " + resource)
-
-
-def setRequest(resource, args):
- return generateRequest("SET " + resource + "?arg=" + args)