|
|
@ -52,9 +52,10 @@ if __name__ == "__main__": |
|
|
|
logger.info("Ok") |
|
|
|
logger.info("Ok") |
|
|
|
|
|
|
|
|
|
|
|
while True: |
|
|
|
while True: |
|
|
|
text = socket.recv() |
|
|
|
received_bytes = socket.recv() |
|
|
|
|
|
|
|
text = received_bytes.decode('utf-8') |
|
|
|
logger.info('Got message %s' % text) |
|
|
|
logger.info('Got message %s' % text) |
|
|
|
if text == b'ping': |
|
|
|
if text == 'ping': |
|
|
|
handlePing() |
|
|
|
handlePing() |
|
|
|
logger.info('Sent pong') |
|
|
|
logger.info('Sent pong') |
|
|
|
else: |
|
|
|
else: |
|
|
|