-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SocketIOServer with Spring Boot RESTful API on the same port 8080 #1011
Comments
You can use "https://github.com/trinopoty/socket.io-server-java" |
@avrilft I have to run spring boot restful API along with netty-socketio server in the same apache tomcat on the port 443 in the production. Not like restful api on 443 and netty socketio on 8443 in the production |
If you're using springboot, check out the following examples. This example socketio service with springboot embedded tomcat to use the same port, the code below USES the library "https://github.com/trinopoty/socket.io-server-java" `
}
}` |
you can do it with some tweaks: duplicate this class from the library: SocketIOChannelInitializer and add a custom handler just before PACKET_HANDLER: netty-socketio/src/main/java/com/corundumstudio/socketio/SocketIOChannelInitializer.java Line 184 in 65246f3 => something like: pipeline.addLast(HTTP_REQUEST_HANDER, httpRequestHandler);
then use that custom class when initializing the socketio object:
httpRequestHandler mentioned earlier would be an instance of a custom class that implements SimpleChannelInboundHandler
worked for me :) |
I am trying to include netty-socketio in spring boot RESTful API application and am trying to run it on the same port.
I am not successful this approach.
Is it possible to run the both netty-socketio and spring boot on the same port?
The text was updated successfully, but these errors were encountered: