code: func (e *endpoint) Peek(vec [][]byte) (uintptr, tcpip.ControlMessages, *tcpip.Error) {
  	e.mu.RLock()
  	defer e.mu.RUnlock()
  
  	// The endpoint can be read if it's connected, or if it's already closed
  	// but has some pending unread data.
  	if s := e.state; s != stateConnected && s != stateClosed {
  		if s == stateError {
  			return 0, tcpip.ControlMessages{}, e.hardError
  		}
  		return 0, tcpip.ControlMessages{}, tcpip.ErrInvalidEndpointState
  	}
  
  	e.rcvListMu.Lock()
  	defer e.rcvListMu.Unlock()
  
  	if e.rcvBufUsed == 0 {
  		if e.rcvClosed || e.state != stateConnected {
  			return 0, tcpip.ControlMessages{}, tcpip.ErrClosedForReceive
  		}
  		return 0, tcpip.ControlMessages{}, tcpip.ErrWouldBlock
  	}
  
  	// Make a copy of vec so we can modify the slide headers.
  	vec = append([][]byte(nil), vec...)
  
  	var num uintptr
  
  	for s := e.rcvList.Front(); s != nil; s = s.Next() {
  		views := s.data.Views()
  
  		for i := s.viewToDeliver; i < len(views); i++ {
  			v := views[i]
  
  			for len(v) > 0 {
  				if len(vec) == 0 {
  					return num, tcpip.ControlMessages{}, nil
  				}
  				if len(vec[0]) == 0 {
  					vec = vec[1:]
  					continue
  				}
  
  				n := copy(vec[0], v)
  				v = v[n:]
  				vec[0] = vec[0][n:]
  				num += uintptr(n)
  			}
  		}
  	}
  
  	return num, tcpip.ControlMessages{}, nil
  }
docs: // Peek reads data without consuming it from the endpoint.
  //
  // This method does not block if there is no data pending.