Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing same port for REST endpoints and netty socket.io?

Tags:

netty

Besides netty socket.io, I have implemented some REST endpoints, mainly to control the server or get its health state.

I am running netty socket.io on port 443, and a separate jetty server on another port, which I would like to move to port 443 as well.

I know I can't run both services on the same port, but I believe I saw socket.io is using jetty internally. Is there a way to use the internal jetty instance for my REST endpoints?

like image 383
Oliver Hausler Avatar asked Sep 18 '25 10:09

Oliver Hausler


1 Answers

Netty-Socket.io seems to be built on top of Netty and this is not the same thing as Jetty. Jetty is a servlet container, whereas Netty is an asynchronous event-driven network framework. Check this question for details on Netty vs. Jetty.

I don't see how you'd be able to use the underlying Netty framework to expose your REST endpoints. Unless you fork Netty-Socket.io and modify its Netty pipeline.

like image 109
Leo Gomes Avatar answered Sep 21 '25 12:09

Leo Gomes