Compare commits
2 Commits
f365139e9f
...
115deaab4b
| Author | SHA1 | Date | |
|---|---|---|---|
|
115deaab4b
|
|||
|
8d2b8f9519
|
@@ -70,7 +70,7 @@ class BackendServer:
|
|||||||
target_id (str): The id of the ACK'd message.
|
target_id (str): The id of the ACK'd message.
|
||||||
"""
|
"""
|
||||||
ack: bytes = Message.ack(target_id=target_id).to_bytes()
|
ack: bytes = Message.ack(target_id=target_id).to_bytes()
|
||||||
self.logger.debug(f"[>] Sending ACK to {client}")
|
self.logger.info(f"[>] Sending ACK to {client}")
|
||||||
client.outbound += ack
|
client.outbound += ack
|
||||||
|
|
||||||
def _accept_connection(self, sock: socket.socket) -> None:
|
def _accept_connection(self, sock: socket.socket) -> None:
|
||||||
@@ -128,7 +128,7 @@ class BackendServer:
|
|||||||
Returns:
|
Returns:
|
||||||
bytes: The received data.
|
bytes: The received data.
|
||||||
"""
|
"""
|
||||||
recv_data = sock.recv(1024)
|
recv_data = sock.recv(packet_size)
|
||||||
if recv_data:
|
if recv_data:
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
f"[<] Received data from {client}: {recv_data!r}"
|
f"[<] Received data from {client}: {recv_data!r}"
|
||||||
@@ -195,9 +195,10 @@ class BackendServer:
|
|||||||
)
|
)
|
||||||
self._disconnect(client)
|
self._disconnect(client)
|
||||||
return
|
return
|
||||||
|
|
||||||
while b"\n" in client.inbound:
|
while b"\n" in client.inbound:
|
||||||
line, client.inbound = client.inbound.split(b"\n", 1)
|
line, client.inbound = client.inbound.split(b"\n", 1)
|
||||||
self.logger.info(
|
self.logger.debug(
|
||||||
f"[<] Complete message from {client}: {line!r}"
|
f"[<] Complete message from {client}: {line!r}"
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user