if (ws.getType() == WebSocketFrameType.PING ||
ws.getType() == WebSocketFrameType.CLOSE) {
target = channel.send(ws.getType() == WebSocketFrameType.PING ? WebSocketFrameType.PONG : WebSocketFrameType.CLOSE);
} else if (ws.getType() == WebSocketFrameType.PONG) {
ws.getReadSetter().set(ChannelListeners.drainListener(Long.MAX_VALUE, null, null));
ws.wakeupReads();
return;
} else {
target = channel.send(ws.getType());
}
ChannelListeners.initiateTransfer(Long.MAX_VALUE, ws, target, null, ChannelListeners.writeShutdownChannelListener(new ChannelListener<StreamSinkFrameChannel>() {