|
|
@ -29,6 +29,7 @@ import io.netty.handler.codec.http.QueryStringDecoder; |
|
|
|
import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; |
|
|
|
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; |
|
|
|
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; |
|
|
|
import io.netty.handler.codec.http.websocketx.WebSocketFrameAggregator; |
|
|
|
import io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker; |
|
|
|
import io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory; |
|
|
|
import io.netty.util.ReferenceCountUtil; |
|
|
@ -41,6 +42,7 @@ import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
import com.corundumstudio.socketio.Configuration; |
|
|
|
import com.corundumstudio.socketio.SocketIOChannelInitializer; |
|
|
|
import com.corundumstudio.socketio.Transport; |
|
|
|
import com.corundumstudio.socketio.handler.AuthorizeHandler; |
|
|
|
import com.corundumstudio.socketio.handler.ClientHead; |
|
|
@ -159,6 +161,9 @@ public class WebSocketTransport extends ChannelInboundHandlerAdapter { |
|
|
|
log.error("Can't handshake " + sessionId, future.cause()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
channel.pipeline().addBefore(SocketIOChannelInitializer.WEB_SOCKET_TRANSPORT, SocketIOChannelInitializer.WEB_SOCKET_AGGREGATOR, |
|
|
|
new WebSocketFrameAggregator(configuration.getMaxFramePayloadLength())); |
|
|
|
connectClient(channel, sessionId); |
|
|
|
} |
|
|
|
}); |
|
|
|