if (this.opcode == OPCODE_TEXT) {
if (frame.readableBytes() > MAX_LENGTH) {
throw new TooLongFrameException();
}
return new DefaultWebSocketFrame(0x00, frame);
} else if (this.opcode == OPCODE_BINARY) {
return new DefaultWebSocketFrame(0xFF, frame);
} else if (this.opcode == OPCODE_PING) {
channel.write(new Pong(0x00, frame));
return null;
} else if (this.opcode == OPCODE_PONG) {
return new Pong(0x00, frame);