Git Product home page Git Product logo

Comments (6)

KillerJulian avatar KillerJulian commented on June 5, 2024 1

We can mark this issue as solved.

The implementation in the production server was incorrect. This only used the engine.io protocol sub-protocol. Then of course it is clear if the corresponding events are not thrown.

Sorry for the inconvenience

from socket.io-client.

darrachequesne avatar darrachequesne commented on June 5, 2024

Hi! Do you get a connect_error event instead?

socket.on('connect_error', (err) => {
  console.log('"connect_error" event was fired', err)
});

from socket.io-client.

KillerJulian avatar KillerJulian commented on June 5, 2024
  1. i do not get an connect_error event
  2. for testing I used a socket.io server with Node
  3. i used a Jetty server for testing with the WebClient

Could it be that the connect event is only thrown when connecting to a socket io server?

from socket.io-client.

darrachequesne avatar darrachequesne commented on June 5, 2024

for testing I used a socket.io server with Node
i used a Jetty server for testing with the WebClient

Which server implementation are you using, the Node.js one?

If you enable the debug logs (by setting localStorage.debug = '*' in your console), do you get any useful information?

from socket.io-client.

KillerJulian avatar KillerJulian commented on June 5, 2024

The production server is the Jetty server, on which it does not work 100 per cent. The debugging does not produce any further output in the console.

It establishes the connection and also sends data:
network_trafic

I have to do some weird workarounds to make the connection work:

socket.io.on('open', () => {
  socket.onconnect();
});

socket.onAny((data) => {
  console.log('Here comes my data', data);
});

socket.on('message', (msg) => {
  console.log('Here comes no data', data);
});

from socket.io-client.

darrachequesne avatar darrachequesne commented on June 5, 2024

After the 40... message (which means "I want to enter the namespace named /statistics/websocket/stat1/"), the client should get a response from the server ("OK for namespace /statistics/websocket/stat1/"), which does not seem to be the case here.

It sounds like a bug. Could you please open an issue on the repository of the Jetty server?

from socket.io-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.