Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 86 for dialIP (0.24 sec)

  1. src/net/dial.go

    // When using TCP, and the host resolves to multiple IP addresses,
    // Dial will try each IP address in order until one succeeds.
    //
    // Examples:
    //
    //	Dial("tcp", "golang.org:http")
    //	Dial("tcp", "192.0.2.1:http")
    //	Dial("tcp", "198.51.100.1:80")
    //	Dial("udp", "[2001:db8::1]:domain")
    //	Dial("udp", "[fe80::1%lo0]:53")
    //	Dial("tcp", ":80")
    //
    // For IP networks, the network must be "ip", "ip4" or "ip6" followed
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  2. src/net/error_test.go

    		return nil, &DNSError{Err: "dial error test", Name: "name", Server: "server", IsTimeout: true}
    	}
    	sw.Set(socktest.FilterConnect, func(so *socktest.Status) (socktest.AfterFilter, error) {
    		return nil, errOpNotSupported
    	})
    	defer sw.Set(socktest.FilterConnect, nil)
    
    	d := Dialer{Timeout: someTimeout}
    	for i, tt := range dialErrorTests {
    		i, tt := i, tt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go

    	}
    
    	return tlsConn, nil
    }
    
    // dialWithoutProxy dials the host specified by url, using TLS if appropriate.
    func (s *SpdyRoundTripper) dialWithoutProxy(ctx context.Context, url *url.URL) (net.Conn, error) {
    	dialAddr := netutil.CanonicalAddr(url)
    	dialer := s.Dialer
    	if dialer == nil {
    		dialer = &net.Dialer{}
    	}
    
    	if url.Scheme == "http" {
    		return dialer.DialContext(ctx, "tcp", dialAddr)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  4. src/crypto/tls/tls.go

    //
    // DialWithDialer uses context.Background internally; to specify the context,
    // use [Dialer.DialContext] with NetDialer set to the desired dialer.
    func DialWithDialer(dialer *net.Dialer, network, addr string, config *Config) (*Conn, error) {
    	return dial(context.Background(), dialer, network, addr, config)
    }
    
    func dial(ctx context.Context, netDialer *net.Dialer, network, addr string, config *Config) (*Conn, error) {
    	if netDialer.Timeout != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  5. src/net/dial_test.go

    	defer ln.Close()
    	_, port, err := SplitHostPort(ln.Addr().String())
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	ctx := contextWithNonZeroDeadline{Context: context.Background()}
    	var dialer Dialer
    	c, err := dialer.DialContext(ctx, "tcp", JoinHostPort("", port))
    	if err != nil {
    		t.Fatal(err)
    	}
    	c.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  6. src/net/tcpsock_test.go

    		}()
    	}
    	attempts := 10 * N
    	fails := 0
    	d := &Dialer{Timeout: 200 * time.Millisecond}
    	for i := 0; i < attempts; i++ {
    		c, err := d.Dial("tcp", ln.Addr().String())
    		if err != nil {
    			fails++
    		} else {
    			c.Close()
    		}
    	}
    	ln.Close()
    	wg.Wait()
    	if fails > attempts/9 { // see issues 7400 and 7541
    		t.Fatalf("too many Dial failed: %v", fails)
    	}
    	if fails > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  7. src/net/server_test.go

    			}
    
    			trch := make(chan error, 1)
    			_, port, err := SplitHostPort(ls.PacketConn.LocalAddr().String())
    			if err != nil {
    				t.Fatal(err)
    			}
    			if tt.dial {
    				d := Dialer{Timeout: someTimeout}
    				c2, err := d.Dial(tt.tnet, JoinHostPort(tt.taddr, port))
    				if err != nil {
    					if perr := parseDialError(err); perr != nil {
    						t.Error(perr)
    					}
    					t.Fatal(err)
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 11.7K bytes
    - Viewed (0)
  8. src/net/timeout_test.go

    				delay := afterDial.Sub(beforeDial)
    				if delay < d.Timeout {
    					t.Errorf("Dial returned after %v; want ≥%v", delay, d.Timeout)
    				}
    			}
    
    			if perr := parseDialError(err); perr != nil {
    				t.Errorf("unexpected error from Dial: %v", perr)
    			}
    			if nerr, ok := err.(Error); !ok || !nerr.Timeout() {
    				t.Errorf("Dial: %v, want timeout", err)
    			}
    		})
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 18:06:55 UTC 2024
    - 30K bytes
    - Viewed (0)
  9. src/net/net_test.go

    	serverDone := make(chan struct{})
    	dialed := make(chan struct{})
    	go func() {
    		defer close(serverDone)
    
    		cs, err := ln.Accept()
    		if err != nil {
    			return
    		}
    		<-dialed
    		cs.(*TCPConn).SetLinger(0)
    		cs.Close()
    	}()
    	defer func() {
    		ln.Close()
    		<-serverDone
    	}()
    
    	ss, err := Dial("tcp", ln.Addr().String())
    	close(dialed)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 21:04:44 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. src/net/lookup.go

    // dial makes a new connection to the provided server (which must be
    // an IP address) with the provided network type, using either r.Dial
    // (if both r and r.Dial are non-nil) or else Dialer.DialContext.
    func (r *Resolver) dial(ctx context.Context, network, server string) (Conn, error) {
    	// Calling Dial here is scary -- we have to be sure not to
    	// dial a name that will require a DNS lookup, or Dial will
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 28.6K bytes
    - Viewed (0)
Back to top