trinopoty / socket.io-server-java

Socket.IO Server Library for Java
Other
179 stars 50 forks source link

Is Socket.io-server is compatible with netty server ? #31

Closed SaraAadilKhan closed 2 years ago

SaraAadilKhan commented 2 years ago

Hi @trinopoty / @oddmario Is Socket.io-server is compatible with netty server and whether it is feasible or not to use with the netty server and if yes whether the functionality that is provided in jetty server(setting the context and all) can be done for netty server as well

SaraAadilKhan commented 2 years ago

Hi @trinopoty If it can be done then please share any demo project for netty - io.netty server

trinopoty commented 2 years ago

Hi, Sorry for the delayed response. I was traveling for a while. This project does not support netty. But, there is a different project that's built for netty. You can find it here: https://github.com/mrniko/netty-socketio

SaraAadilKhan commented 2 years ago

No problem @trinopoty Thank you so much for replying could I just know the performance of jetty ? why only jetty has been used instead of netty? if you could just throw some light or any reference it would be greatful

trinopoty commented 2 years ago

Netty does not follow the standard servlet model as far as I'm aware. While this is not directly supported, it could be possible to construct a wrapper around netty in the case of polling. As for websocket, that could be supported with a thin wrapper as well.

The jetty support library is only required if you're using jetty embedded with manual configuration. Since we use jetty for the integration tests, it made sense to just include the code as a library.

If you wish to use mrniko's netty implementation, there is a demo project here: https://github.com/mrniko/netty-socketio-demo

If you wish to adapt this library to netty, you'll need to come up with the wrapper yourself. I could also take a look and give you pointers given some time.

SaraAadilKhan commented 2 years ago

Hi @trinopoty

Thank you for your response

SZahera commented 2 years ago

Hi @trinopoty Wanted to know about the SocketIoclient as in mrniko's netty implementation, there is SocketIOClient client so in this library where it is found in which package and is their any similar functionality client.getAllRooms().contains(channel)?

trinopoty commented 2 years ago

Hi, Unfortunately, I haven't used the netty socket.io library and am unable to answer your question.

SZahera commented 2 years ago

Hi @trinopoty What will be the compatible client with this SocketIoServer or any reference link for this?

trinopoty commented 2 years ago

Hi, All major versions of the server library is compatible with all major versions of the client library. For instance, v3 of the server library supports any v3 of the client library.