jaraco / irc

Full-featured Python IRC library for Python.
MIT License
390 stars 84 forks source link

[AIO] No client side ping-pong #187

Open hifi opened 3 years ago

hifi commented 3 years ago

IRC servers PING clients if the TCP connection is idle to ensure dead streams are dropped. On the other hand clients need to do the same to detect the same issue if they don't get anything from servers for a good while.

Currently no client side ping is implemented and if the socket stalls it will only be detected by the TCP stack when you try to send something and you immediately get disconnected. This is not ideal when you want to stay connected.

I have a local implementation for the AIO client currently implemented as a Protocol: https://github.com/hifi/heisenbridge/blob/master/heisenbridge/irc.py#L12

Let me know if this can be worked upstream somehow. It has been field tested by now that it seems to do about the right thing.