je sais pas ce que j'ai fais en plus depuis la dernière fois
This commit is contained in:
parent
5c3394c28e
commit
3f1940df00
@ -77,6 +77,9 @@ main_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
main_socket.bind((HOST, PORT))
|
||||
|
||||
|
||||
class ServerThread(threading.Thread):
|
||||
"""Main server thread"""
|
||||
|
||||
#### Threads ####
|
||||
class ClientThread(threading.Thread):
|
||||
"""Main thread, for each client"""
|
||||
@ -224,7 +227,7 @@ class ClientThread(threading.Thread):
|
||||
if chunk != END_MESSAGE:
|
||||
# Get content part
|
||||
# int.from_bytes(chunk[:2], byteorder='big') == Get content size
|
||||
content += chunk[2:int.from_bytes(chunk[:2], byteorder='big')+2]
|
||||
content += chunk[2:int.from_bytes(chunk[:2], byteorder='big') + 2]
|
||||
debug(b"Received from" + bytes(str(self.ip), 'ascii') + b" : " + content)
|
||||
return content
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user