code: func (e *endpoint) readyReceiveSize() (int, *tcpip.Error) {
  	e.mu.RLock()
  	defer e.mu.RUnlock()
  
  	// The endpoint cannot be in listen state.
  	if e.state == stateListen {
  		return 0, tcpip.ErrInvalidEndpointState
  	}
  
  	e.rcvListMu.Lock()
  	defer e.rcvListMu.Unlock()
  
  	return e.rcvBufUsed, nil
  }
docs: // readyReceiveSize returns the number of bytes ready to be received.