netty-socketio icon indicating copy to clipboard operation
netty-socketio copied to clipboard

Unable to configure server path

Open aliilyas opened this issue 8 years ago • 5 comments
trafficstars

@Leonya Trying to start server at path like localhost:8080/chat, javascript implementation contains feature like var io = require('socket.io')(8080, {path: "/swift"}) . How to do this with netty-socketio?

aliilyas avatar Mar 06 '17 04:03 aliilyas

@robymus @ntrp

aliilyas avatar Mar 06 '17 05:03 aliilyas

This works for me fine, I just set the path like this io({path: '/socket/socket.io/'}) and use a reverse proxy.

jonfreedman avatar Sep 04 '17 10:09 jonfreedman

any update on this @mrniko ?

Ramanth avatar Jul 13 '22 14:07 Ramanth

com.corundumstudio.socketio.Configuration has a setContext method, which changes the default path (eg. /socket.io). Have you tried using this?

import com.corundumstudio.socketio.Configuration
import com.corundumstudio.socketio.SocketIOServer
// ...
Configuration config = new Configuration();
config.setHostname("localhost");
config.setPort(8080);
config.setContext("/swift");
SocketIOServer server = new SocketIOServer(config);

robymus avatar Jul 14 '22 11:07 robymus

This only changes the way how the handshake is done and the actual connection - sending message still has to be done on root path - which is not the behavior we want

AleksandarTokarev avatar Aug 18 '23 07:08 AleksandarTokarev