code: public void writeSocket(@NotNull final WireOut wire, boolean reconnectOnFailure) {
          assert outBytesLock().isHeldByCurrentThread();
  
          try {
              assert wire.startUse();
              @Nullable SocketChannel clientChannel = this.clientChannel;
  
              // wait for the channel to be non null
              if (clientChannel == null) {
                  if (!reconnectOnFailure) {
                      return;
                  }
                  final byte[] bytes = wire.bytes().toByteArray();
                  assert wire.endUse();
                  condition.await(10, TimeUnit.SECONDS);
                  assert wire.startUse();
                  wire.clear();
                  wire.bytes().write(bytes);
              }
  
              writeSocket1(wire, this.clientChannel);
          } catch (ClosedChannelException e) {
              closeSocket();
              Jvm.pause(500);
              if (reconnectOnFailure)
                  throw new ConnectionDroppedException(e);
  
          } catch (IOException e) {
              if (!"Broken pipe".equals(e.getMessage()))
                  Jvm.warn().on(getClass(), e);
              closeSocket();
              Jvm.pause(500);
              throw new ConnectionDroppedException(e);
  
          } catch (ConnectionDroppedException e) {
              closeSocket();
              Jvm.pause(500);
              throw e;
  
          } catch (Exception e) {
              Jvm.warn().on(getClass(), e);
              closeSocket();
              Jvm.pause(500);
              throw new ConnectionDroppedException(e);
  
          } finally {
              assert wire.endUse();
          }
      }
docs: sends data to the server via TCP/IP
  
  @param wire the {@code wire} containing the outbound data