docs: private void readPayload() throws IOException, InterruptedException {
          if (incomingBuffer.remaining() != 0) { // have we read length bytes?
              int rc = sock.read(incomingBuffer); // sock is non-blocking, so ok
              if (rc < 0) {
                  throw new EndOfStreamException(
                          "Unable to read additional data from client sessionid 0x"
                          + Long.toHexString(sessionId)
                          + ", likely client has closed socket");
              }
          }
  
          if (incomingBuffer.remaining() == 0) { // have we read length bytes?
              packetReceived();
              incomingBuffer.flip();
              if (!initialized) {
                  readConnectRequest();
              } else {
                  readRequest();
              }
              lenBuffer.clear();
              incomingBuffer = lenBuffer;
          }
      }