docs: private int read(ByteBuffer buf)
      {
          int nbytes;
          try {
              nbytes = fd.read(buf);
              if (nbytes == -1) {
                  errno.set(ZError.ENOTCONN);
              }
              else if (nbytes == 0) {
                  if (!fd.isBlocking()) {
                      //  If not a single byte can be read from the socket in non-blocking mode
                      //  we'll get an error (this may happen during the speculative read).
  
                      //  Several errors are OK. When speculative read is being done we may not
                      //  be able to read a single byte from the socket. Also, SIGSTOP issued
                      //  by a debugging tool can result in EINTR error.
                      errno.set(ZError.EAGAIN);
                      nbytes = -1;
                  }
              }
          }
          catch (IOException e) {
              errno.set(ZError.ENOTCONN);
              nbytes = -1;
          }
  
          return nbytes;
      }