Skip to content

Commit

Permalink
Update server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 authored Mar 4, 2024
1 parent f296b16 commit 699e455
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,22 @@ def send_accept(cls, conn, method, success = True):
"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 = ""
Expand Down

0 comments on commit 699e455

Please sign in to comment.