@Override
  public void send(Send request) throws IOException {
    try {
      if (!connected) {
        throw new ClosedChannelException();
      }
      while (!request.isSendComplete()) {
        request.writeTo(writeChannel);
      }
    } finally {
      request.release();
    }
  }
Sets socket options to close immediately
(subsequent Socket.close() will cause connection closure by sending TCP RST instead of FIN
ambry-network/src/main/java/com/github/ambry/network/BlockingChannel.java