code: public ChannelFuture close(Channel channel, CloseWebSocketFrame frame) {
          if (channel == null) {
              throw new NullPointerException("channel");
          }
          return close(channel, frame, channel.newPromise());
      }
docs: Performs the closing handshake
  
  @param channel
  Channel
  @param frame
  Closing Frame that was received