Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to NodeJS server if a browser socket.io client has connected first #408

Open
alec-g opened this issue Oct 6, 2023 · 0 comments

Comments

@alec-g
Copy link

alec-g commented Oct 6, 2023

Hello,

Facing an odd issue today, I was able to successfully get my C++ application connecting to my NodeJS Server, however, as soon as I hooked up a browser client (from my frontend application) to the same socket.io server, I started having issues. With the NodeJS server running, if the first client to connect is the socket.io-client-cpp client, the connection is successful. If the first client to connect is the browser socket.io client, the browser connection is successful but the socket.io-client-cpp client will never connect after this, the console output from the C++ client:

[connect] Successful connection
[connect] WebSocket Connection 192.168.8.5:3001 v-2 "WebSocket++/0.8.2" /socket.io/?EIO=3&transport=websocket&t=1696571901 101
[error] handle_read_frame error: websocketpp.transport:7 (End of File)
[disconnect] Disconnect close local:[1006,End of File] remote:[1006]

The browser client always succesfully connects regardless if the cpp client has connected or not. The cpp client will always connect so long as the browser client has not yet connected.

I have tried a few different server / client versions:

  • NodeJS server / client v4.x, C++ client v3.x
  • NodeJS server / client v3.x, C++ client v3.x
  • NodeJS server / client v3.x (with allowEIO3: true), C++ client v2.x

Any advice is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant