code: func DialTCP(s *stack.Stack, addr tcpip.FullAddress, network tcpip.NetworkProtocolNumber) (*Conn, error) {
  	// Create TCP endpoint, then connect.
  	var wq waiter.Queue
  	ep, err := s.NewEndpoint(tcp.ProtocolNumber, network, &wq)
  	if err != nil {
  		return nil, errors.New(err.String())
  	}
  
  	// Create wait queue entry that notifies a channel.
  	//
  	// We do this unconditionally as Connect will always return an error.
  	waitEntry, notifyCh := waiter.NewChannelEntry(nil)
  	wq.EventRegister(&waitEntry, waiter.EventOut)
  	defer wq.EventUnregister(&waitEntry)
  
  	err = ep.Connect(addr)
  	if err == tcpip.ErrConnectStarted {
  		<-notifyCh
  		err = ep.GetSockOpt(tcpip.ErrorOption{})
  	}
  	if err != nil {
  		ep.Close()
  		return nil, &net.OpError{
  			Op:   "connect",
  			Net:  "tcp",
  			Addr: fullToTCPAddr(addr),
  			Err:  errors.New(err.String()),
  		}
  	}
  
  	return NewConn(&wq, ep), nil
  }
docs: // DialTCP creates a new TCP Conn connected to the specified address.