mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-02-11 09:25:00 +00:00
Update server.py
This commit is contained in:
parent
f296b165d6
commit
699e455bef
16
server.py
16
server.py
|
@ -525,6 +525,22 @@ class Extension():
|
|||
"success": success
|
||||
})
|
||||
conn.send(message)
|
||||
|
||||
@classmethod
|
||||
def readall(cls, conn):
|
||||
data = b''
|
||||
|
||||
conn.settimeout(1)
|
||||
while True:
|
||||
try:
|
||||
chunk = conn.recv(buffer_size)
|
||||
if not chunk:
|
||||
break
|
||||
data += chunk
|
||||
except:
|
||||
pass
|
||||
|
||||
return data
|
||||
|
||||
def __init__(self):
|
||||
self.type = ""
|
||||
|
|
Loading…
Reference in New Issue
Block a user