public synchronized void start ( ) { if ( isStarted ( ) ) { throw new IllegalStateException ( "Failed to start Socket.IO server: server already started" ) ; } log . info ( "Socket.IO server starting" ) ; // Configure heartbeat scheduler timer = new HashedWheelTimer ( ) ; timer . start ( ) ; SocketIOHeartbeatScheduler . setHashedWheelTimer ( timer ) ; SocketIOHeartbeatScheduler . setHeartbeatInterval ( configuration . getHeartbeatInterval ( ) ) ; SocketIOHeartbeatScheduler . setHeartbeatTimeout ( configuration . getHeartbeatTimeout ( ) ) ; // Configure and bind server ServerBootstrapFactory bootstrapFactory = serverBootstrapFactory != null ? serverBootstrapFactory : new DefaultServerBootstrapFactory ( configuration ) ; bootstrap = bootstrapFactory . createServerBootstrap ( ) ; bootstrap . childHandler ( new SocketIOChannelInitializer ( configuration , listener , pipelineModifier ) ) ; bootstrap . bind ( configuration . getPort ( ) ) . syncUninterruptibly ( ) ; state = State . STARTED ; log . info ( "Socket.IO server started: {}" , configuration ) ; }
Starts Socket . IO server with current configuration settings .