模块 org.redkale

类 WebSocketReadHandler

    • 字段详细资料

      • webSocket

        protected final WebSocket webSocket
      • logger

        protected final Logger logger
      • currSeriesMergeMessageBytes

        protected ByteArray currSeriesMergeMessageBytes
      • halfFrameBytes

        protected final ByteArray halfFrameBytes
      • halfFrameOpcode

        protected byte halfFrameOpcode
      • halfFrameCrcode

        protected byte halfFrameCrcode
      • halfFrameMasks

        protected byte[] halfFrameMasks
      • halfFrameStart

        protected int halfFrameStart
      • halfFrameLength

        protected int halfFrameLength
    • 方法详细资料

      • startRead

        public void startRead()
      • readDecode

        protected void readDecode​(ByteBuffer realbuf)
        消息解码
        0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |F|R|R|R| opcode|M| Payload len | Extended payload length | |I|S|S|S| (4) |A| (7) | (16/64) | |N|V|V|V| |S| | (if payload len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - + : Payload Data continued : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued | +-----------------------------------------------------------------------+
        参数:
        realbuf - ByteBuffer