Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 102 for dial (0.04 sec)

  1. src/internal/trace/testdata/testprog/stacks.go

    	done1 <- true
    	<-done2
    	select {
    	case c1 <- 0:
    	case c2 <- 0:
    	}
    	mu.Unlock()
    	wg.Done()
    	cv.Signal()
    	c, err := net.Dial("tcp", ln.Addr().String())
    	if err != nil {
    		log.Fatalf("failed to dial: %v", err)
    	}
    	c.Close()
    	var data [1]byte
    	wp.Write(data[:])
    	<-pipeReadDone
    
    	oldGoMaxProcs := runtime.GOMAXPROCS(0)
    	runtime.GOMAXPROCS(oldGoMaxProcs + 1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. src/cmd/trace/testdata/testprog/main.go

    	go func() {
    		c, err := ln.Accept()
    		if err != nil {
    			return
    		}
    		time.Sleep(time.Millisecond)
    		var buf [1]byte
    		c.Write(buf[:])
    		c.Close()
    	}()
    	c, err := net.Dial("tcp", ln.Addr().String())
    	if err != nil {
    		log.Fatalf("dial failed: %v", err)
    	}
    	var tmp [1]byte
    	c.Read(tmp[:])
    	c.Close()
    
    	trace.Stop()
    }
    
    // blockingSyscall blocks the current goroutine for duration d in a syscall and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. src/internal/trace/testdata/testprog/stress-start-stop.go

    			c, err := ln.Accept()
    			if err != nil {
    				return
    			}
    			time.Sleep(time.Millisecond)
    			var buf [1]byte
    			c.Write(buf[:])
    			c.Close()
    		}()
    		c, err := net.Dial("tcp", ln.Addr().String())
    		if err != nil {
    			log.Fatalf("dial failed: %v", err)
    			return
    		}
    		var tmp [1]byte
    		c.Read(tmp[:])
    		c.Close()
    
    		go func() {
    			runtime.Gosched()
    			select {}
    		}()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. src/net/resolverdialfunc_test.go

    // Test that Resolver.Dial can be a func returning an in-memory net.Conn
    // speaking DNS.
    
    package net
    
    import (
    	"bytes"
    	"context"
    	"errors"
    	"fmt"
    	"reflect"
    	"slices"
    	"testing"
    	"time"
    
    	"golang.org/x/net/dns/dnsmessage"
    )
    
    func TestResolverDialFunc(t *testing.T) {
    	r := &Resolver{
    		PreferGo: true,
    		Dial: newResolverDialFunc(&resolverDialHandler{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  5. pilot/pkg/grpc/grpc.go

    	defaultInitialConnWindowSize       = 1024 * 1024 // default gRPC InitialWindowSize
    	defaultInitialWindowSize           = 1024 * 1024 // default gRPC ConnWindowSize
    )
    
    // ClientOptions returns consistent grpc dial options with custom dial options
    func ClientOptions(options *istiokeepalive.Options, tlsOpts *TLSOptions) ([]grpc.DialOption, error) {
    	if options == nil {
    		options = istiokeepalive.DefaultOption()
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Feb 17 04:27:50 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. src/crypto/x509/hybrid_pool_test.go

    		// a better possible long term solution.
    
    		deadline := time.Now().Add(time.Second * 10)
    		nextSleep := 10 * time.Millisecond
    		for i := 0; ; i++ {
    			c, err := tls.Dial("tcp", "google.com:443", nil)
    			if err == nil {
    				c.Close()
    				break
    			}
    			nextSleep = nextSleep * time.Duration(i)
    			if time.Until(deadline) < nextSleep {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:48:11 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  7. src/runtime/testdata/testprognet/waiters.go

    			log.Fatal(err)
    		}
    		defer conn.Close()
    		if _, err := io.Copy(io.Discard, conn); err != nil {
    			log.Fatal(err)
    		}
    	}()
    
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		conn, err := net.Dial("tcp", listener.Addr().String())
    		if err != nil {
    			log.Fatal(err)
    		}
    		defer conn.Close()
    		for i := 0; i < 10; i++ {
    			fmt.Fprintf(conn, "%d\n", i)
    			time.Sleep(time.Millisecond)
    		}
    	}()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. internal/http/dial_others.go

    func setTCPParametersFn(opts TCPOptions) func(network, address string, c syscall.RawConn) error {
    	return func(network, address string, c syscall.RawConn) error {
    		return nil
    	}
    }
    
    // DialContext is a function to make custom Dial for internode communications
    type DialContext func(ctx context.Context, network, address string) (net.Conn, error)
    
    // NewInternodeDialContext configures a custom dialer for internode communications
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Apr 24 04:08:47 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  9. pkg/kubelet/util/queue/work_queue_test.go

    	q.Enqueue(types.UID("foo4"), 1*time.Minute)
    	expected := []types.UID{types.UID("foo1"), types.UID("foo2")}
    	compareResults(t, expected, q.GetWork())
    	compareResults(t, []types.UID{}, q.GetWork())
    	// Dial the time to 1 hour ahead.
    	clock.Step(time.Hour)
    	expected = []types.UID{types.UID("foo3"), types.UID("foo4")}
    	compareResults(t, expected, q.GetWork())
    	compareResults(t, []types.UID{}, q.GetWork())
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  10. src/net/unixsock_posix.go

    		sotype = syscall.SOCK_STREAM
    	case "unixgram":
    		sotype = syscall.SOCK_DGRAM
    	case "unixpacket":
    		sotype = syscall.SOCK_SEQPACKET
    	default:
    		return nil, UnknownNetworkError(net)
    	}
    
    	switch mode {
    	case "dial":
    		if laddr != nil && laddr.isWildcard() {
    			laddr = nil
    		}
    		if raddr != nil && raddr.isWildcard() {
    			raddr = nil
    		}
    		if raddr == nil && (sotype != syscall.SOCK_DGRAM || laddr == nil) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 6.6K bytes
    - Viewed (0)
Back to top