Connect to socket.io namespace using socket.io-client.java library

I can connect to socket.io web service without problems using this library https://github.com/nkzawa/socket.io-client.java . However, I cannot figure out how to connect to a specific namespace. I looked at the test code and I think that I may need to create a Manager class.

Any help would be greatly appreciated. Thank you very much.

+4
source share
1 answer
Manager manager = new Manager(new URI("http://socket.com"));
Socket socket = manager.socket("/my-namespace");
socket.connect();
+12
source

Source: https://habr.com/ru/post/1598614/


All Articles