code: func (e *endpoint) Read(*tcpip.FullAddress) (buffer.View, tcpip.ControlMessages, *tcpip.Error) {
  	e.mu.RLock()
  	// The endpoint can be read if it's connected, or if it's already closed
  	// but has some pending unread data. Also note that a RST being received
  	// would cause the state to become stateError so we should allow the
  	// reads to proceed before returning a ECONNRESET.
  	e.rcvListMu.Lock()
  	bufUsed := e.rcvBufUsed
  	if s := e.state; s != stateConnected && s != stateClosed && bufUsed == 0 {
  		e.rcvListMu.Unlock()
  		he := e.hardError
  		e.mu.RUnlock()
  		if s == stateError {
  			return buffer.View{}, tcpip.ControlMessages{}, he
  		}
  		return buffer.View{}, tcpip.ControlMessages{}, tcpip.ErrInvalidEndpointState
  	}
  
  	v, err := e.readLocked()
  	e.rcvListMu.Unlock()
  
  	e.mu.RUnlock()
  
  	return v, tcpip.ControlMessages{}, err
  }
docs: // Read reads data from the endpoint.