ping_interval doesn't change when upgrade to websocket #896
-
I'll preface this by saying I'm new to websockets. So if I seem misguided, my apologies. I'm changing the ping_interval EngineIO option to 60 minutes, which works fine while long-polling. However if allow_upgrades isn't set to false, every 30 seconds, 64 bytes of data is sent, and 64 is received via NetHogs(which is what I'm using to also monitor when it's long-polling). With this connection being on a limited-data connection, this would be roughly 10.5 megabytes of usage in a month. You can duplicate this by using the examples here: https://python-socketio.readthedocs.io/en/latest/intro.html I let this code run for 10 minutes: SERVER: import eventlet sio = socketio.Server(ping_interval=3600, logger=True, engineio_logger=True) @sio.event @sio.event @sio.event if name == 'main': CLIENT: import socketio sio = socketio.Client(logger=True, engineio_logger=True) @sio.event @sio.event @sio.event sio.connect('http://192.168.1.143:5000') Client log output(exception at bottom is keyboardinterupt): Attempting polling connection to http://192.168.1.143:5000/socket.io/?transport=polling&EIO=4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Please follow the instructions. If you don't know if what you are reporting is an issue, then don't write an issue, open a discussion topic. The issues board is for tracking issues, not to troubleshoot. As you can see in the log that you provided, no ping/ponging happened during your test. My guess is that this is caused by keepalive packets sent by the Websocket server that you are using (eventlet), and completely unrelated and outside of the control of this package. Have you looked at the data being exchanged? If don't think you'll find Socket.IO ping/pong packets in there, since clearly these aren't being exchanged, according to the log. |
Beta Was this translation helpful? Give feedback.
Please follow the instructions. If you don't know if what you are reporting is an issue, then don't write an issue, open a discussion topic. The issues board is for tracking issues, not to troubleshoot.
As you can see in the log that you provided, no ping/ponging happened during your test. My guess is that this is caused by keepalive packets sent by the Websocket server that you are using (eventlet), and completely unrelated and outside of the control of this package. Have you looked at the data being exchanged? If don't think you'll find Socket.IO ping/pong packets in there, since clearly these aren't being exchanged, according to the log.