Spring Boot
netty-socket-io.hostname=localhost
netty-socket-io.port=9092
netty-socket-io.ping-timeout=60000
netty-socket-io.ping-interval=25000netty-socket-io:
hostname: localhost
port: 9092
ping-timeout: 60000
ping-interval: 25000
Custom SocketIOServer Bean
@Configuration
public class SocketIOConfig {
@Bean
public SocketIOServer socketIOServer() {
Configuration config = new Configuration();
config.setHostname("localhost");
config.setPort(9092);
return new SocketIOServer(config);
}
}Main Application
Event Handler with Annotations
You can use annotations to define event handlers:
Exception Handling
Full Example
See the complete example in the netty-socketio-examples-spring-boot-base module.
Last updated
Was this helpful?