add network receive function and some ajust but no test

This commit is contained in:
2019-12-14 21:52:01 +08:00
parent 9924a30108
commit 04da406157
4 changed files with 77 additions and 14 deletions

View File

@@ -1,9 +1,9 @@
class Datapack:
def __init__(self, method='post', app='all', version='msw/1.0', head={}, body=b''):
def __init__(self, method='post', app='all', version='msw/1.0', head={}, body=b'', check_head=True):
self.method = method
self.app = app
self.version = version
if not head:
if not head and check_head:
self.head = {'nohead': "true"}
else:
self.head = head