Send back unknown packets to client as text message
This commit is contained in:
parent
30aa2a81c7
commit
92ebbdf64c
@ -210,7 +210,7 @@ class Netserver(asyncio.DatagramProtocol):
|
||||
sack_sent = True
|
||||
|
||||
if not session.next_send == cframe.NRecv:
|
||||
logger.error("Received CFRAME (%s) does not have same NRcv (%s). One sent packet might have been lost.", cframe.NRecv, session.CFRAME_NRcv)
|
||||
logger.error("Received CFRAME (%s) does not have same NRcv (%s). One sent packet might have been lost.", cframe.NRecv, session.next_send)
|
||||
if not sack_sent:
|
||||
session.send_cframe_sack()
|
||||
sack_sent = True
|
||||
@ -227,7 +227,7 @@ class Netserver(asyncio.DatagramProtocol):
|
||||
return
|
||||
#logger.debug("Got a CFrame POLL. Replying with a SACK.")
|
||||
# must send back a ACK
|
||||
#session.send_cframe_sack()
|
||||
session.send_cframe_sack()
|
||||
except Exception:
|
||||
logger.error("Should have been a CFRAME but could not parse it")
|
||||
traceback.print_exc()
|
||||
@ -380,7 +380,8 @@ class Netserver(asyncio.DatagramProtocol):
|
||||
player.session.send_gamedata(b'\x2f\x02\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00', acknow=True) # unknown
|
||||
"""
|
||||
else:
|
||||
logger.debug("OPCODE: %s VALUES: %s", payload[0], payload[1:])
|
||||
logger.debug("OPCODE: %s VALUES: %s", struct.pack("<B", payload[0]).hex(), payload[1:].hex())
|
||||
await self.server.broadcast_message("SENT OPCODE: %s VALUES: %s" % (struct.pack("<B", payload[0]).hex(), payload[1:].hex()))
|
||||
|
||||
|
||||
def send_packet(self, addr, packet):
|
||||
|
Loading…
Reference in New Issue
Block a user