code: func (e *endpoint) receiveBufferAvailable() int {
  	e.rcvListMu.Lock()
  	size := e.rcvBufSize
  	used := e.rcvBufUsed
  	e.rcvListMu.Unlock()
  
  	// We may use more bytes than the buffer size when the receive buffer
  	// shrinks.
  	if used >= size {
  		return 0
  	}
  
  	return size - used
  }
docs: // receiveBufferAvailable calculates how many bytes are still available in the
  // receive buffer.