Got problem with responding for Ping, tried so many ways to response
and always end up with time out or other error. This time:

ERROR :(Ping timeout: 264 seconds)
Traceback (most recent call last):
    s.send(bytes('PONG ' + data.split()[1], 'UTF-8'))
BrokenPipeError: [Errno 32] Broken pipe

while True:
    time.sleep(2)
    data=s.recv(2040).decode('utf8')
    data = data.strip("\n\r")
    print(data)
    if data.find ("PING :"):
        s.send(bytes('PONG ' + data.split()[1], 'UTF-8'))

--
Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to