following adjustment
This commit is contained in:
3
mswp.py
3
mswp.py
@@ -41,3 +41,6 @@ class Datapack:
|
|||||||
print("Error: length is larger than the body")
|
print("Error: length is larger than the body")
|
||||||
raise IOError
|
raise IOError
|
||||||
|
|
||||||
|
def is_complete(self):
|
||||||
|
pass # here needs to add more function
|
||||||
|
|
||||||
|
|||||||
15
test_file.py
Normal file
15
test_file.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import socket
|
||||||
|
|
||||||
|
data = '''post log msw/1.0
|
||||||
|
from: network
|
||||||
|
|
||||||
|
hello, network!'''
|
||||||
|
|
||||||
|
data = data.encode()
|
||||||
|
|
||||||
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
s.connect(('127.0.0.1', 3900))
|
||||||
|
|
||||||
|
s.sendall(data)
|
||||||
|
print(data)
|
||||||
|
s.close()
|
||||||
Reference in New Issue
Block a user