docs: @Override
      public long processSyncWriteRequest(long numBytes, int timeout) throws IOException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "processSyncRequest(" + numBytes + "," + timeout + ")");
          }
  
          long numUserBytesWritten = 0; // no. of user bytes written
  
          if (numBytes != 0) {
              if (this.blockWait == null) {
                  this.blockWait = new SimpleSync();
              }
              this.blockingIOError = null;
  
              // before we write, signal that we want to do the write ourselves
              // and not the worker threads.
              this.blockedThread = true;
  
              VirtualConnection vc = writeInternal(numBytes, null, false, timeout);
  
              while (vc == null) {
                  // block until we are told to write
                  this.blockWait.simpleWait();
  
                  if (this.blockingIOError == null) {
                      vc = ((NioTCPChannel) getTCPConnLink().getTCPChannel()).getWorkQueueManager().processWork(this, 1);
                  } else {
                      break;
                  }
              }
  
              this.blockedThread = false;
              if (this.blockingIOError != null) {
                  throw this.blockingIOError;
              }
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "getIOCompleteAmount() -->" + String.valueOf(getIOCompleteAmount()));
              }
              numUserBytesWritten = getIOCompleteAmount();
          } else {
              WsByteBuffer buffers[] = getBuffers();
              NioSocketIOChannel channel = (NioSocketIOChannel) getTCPConnLink().getSocketIOChannel();
              if (buffers.length == 1) {
                  numUserBytesWritten = channel.write(buffers[0].getWrappedByteBufferNonSafe());
              } else {
                  numUserBytesWritten = channel.write(getByteBufferArray());
              }
          }
  
          // return the number of bytes written
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "processSyncRequest", Long.valueOf(numUserBytesWritten));
          }
          return (numUserBytesWritten);
      }