Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Nodejs socket server and spring boot client

I am trying to connect to my socket server in nodejs with client in spring boot. My nodejs client looked like this while establishing connection to my server passing authentication parameters.

 socket = io('localhost:3000', {
          path: 'https://localhost:3000/socket.io',
          auth: {
            username: 'username',
            token: "abcd",
          },
     });

Now I need to switch my nodejs scoket client to spring boot. Any clues on how to do this in spring boot?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There is a java implementation of the client so that should be quite straightforward. See https://socketio.github.io/socket.io-client-java/

Specifically for auth: https://socketio.github.io/socket.io-client-java/initialization.html#auth

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading