+-+------+---------+-+---------+ |F|xxx(3)|opcode(4)|R|len(7) | +-+------+---------+-+---------+ OPCODES 0 - cont 1 - close 2 - ping 3 - pong 4 - text 5 - binary
464748495051525354
public HmtpWebSocketReader(InputStream is) throws IOException { _hIn = new HmtpReader(); UnmaskedFrameInputStream fIs = new UnmaskedFrameInputStream(); fIs.init(is); _wsIs = new WebSocketInputStream(fIs); }
18891890189118921893189418951896189718981899
if (isMasked) webSocket = new WebSocketContextImpl(this, _response, listener, new MaskedFrameInputStream()); else webSocket = new WebSocketContextImpl(this, _response, listener, new UnmaskedFrameInputStream()); SocketLinkDuplexController controller = _request.startDuplex(webSocket); webSocket.setController(controller); try {