@NotNull
  public ChannelFuture sendFrame(@NotNull ByteBuf message, boolean binary) {
    if (channel.isOpen()) {
      return channel.writeAndFlush(binary ? new BinaryWebSocketFrame(message) : new TextWebSocketFrame(message));
    }
    else {
      return channel.newFailedFuture(new ClosedChannelException());
    }
  }
@NotNull
  public ChannelFuture sendFrame(@NotNull ByteBuf message, boolean binary)