Areej Fatimah
Areej Fatimah

Reputation: 261

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?

Upvotes: 1

Views: 380

Answers (1)

grekier
grekier

Reputation: 3706

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

Upvotes: 1

Related Questions