In WebSocketServerHandshaker* we use ChannelPipeline.replace(..) to replace the old HttpRequestDecoder with the right WebSocker_Decoder. This can lead to lost data as the old HttpRequestDecoder may have some data buffered. We need to use HttpRequestDecoder.replace(..) to make sure every buffered data is "hand-over" to the WebSocket_Decoder.