engine.io-protocol
engine.io-protocol copied to clipboard
test vs. protocol inconsistencies
Hi all, I am writing a socket.io implementation(1) in c++ (based on OAT++ https://oatpp.io/ ). Thank you all for the test suite which helped in testing the implementation! During the process, I am still seeing a number of tests fail due to subtle inconsistencies to the protocol definition.
-
in the "successfully upgrades from HTTP long-polling to WebSocket" test, long-poll requests are closed with a noop message during upgrade. While this is perfectly fine to implement for the test environment, running a straight-forward implementation against the actual socket.io-client implementation results in a long-poll request loop until the upgrade has been performed. Delaying sending the noop until after the upgrade, on the other hand, results in a failed test. What's the expected timing here?
-
in the "ignores HTTP requests with same sid after upgrade" test a websocket upgrade sequence is performed; in line 542, a '4hello' is expected, but actually a '3probe' message would be received first in answer to the '2probe' in line 529 ; the same goes for the following tests. Under which conditions should the 3probe be skipped?
Thanks all for clarification!
(1) https://github.com/voxel-dot-at/oatpp-socketio if you mind