code: func (e *endpoint) Shutdown(flags tcpip.ShutdownFlags) *tcpip.Error {
  	e.mu.Lock()
  	defer e.mu.Unlock()
  	e.shutdownFlags |= flags
  
  	if e.state != stateConnected {
  		return tcpip.ErrNotConnected
  	}
  
  	if flags&tcpip.ShutdownRead != 0 {
  		e.rcvMu.Lock()
  		wasClosed := e.rcvClosed
  		e.rcvClosed = true
  		e.rcvMu.Unlock()
  
  		if !wasClosed {
  			e.waiterQueue.Notify(waiter.EventIn)
  		}
  	}
  
  	return nil
  }
docs: // Shutdown closes the read and/or write end of the endpoint connection
  // to its peer.