Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 182 for connc (0.05 sec)

  1. src/net/http/export_test.go

    	return len(t.idleConn)
    }
    
    func (t *Transport) IdleConnStrsForTesting() []string {
    	var ret []string
    	t.idleMu.Lock()
    	defer t.idleMu.Unlock()
    	for _, conns := range t.idleConn {
    		for _, pc := range conns {
    			ret = append(ret, pc.conn.LocalAddr().String()+"/"+pc.conn.RemoteAddr().String())
    		}
    	}
    	slices.Sort(ret)
    	return ret
    }
    
    func (t *Transport) IdleConnStrsForTesting_h2() []string {
    	var ret []string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. src/net/http/httptest/server.go

    	oldHook := s.Config.ConnState
    	s.Config.ConnState = func(c net.Conn, cs http.ConnState) {
    		s.mu.Lock()
    		defer s.mu.Unlock()
    
    		switch cs {
    		case http.StateNew:
    			if _, exists := s.conns[c]; exists {
    				panic("invalid state transition")
    			}
    			if s.conns == nil {
    				s.conns = make(map[net.Conn]http.ConnState)
    			}
    			// Add c to the set of tracked conns and increment it to the
    			// waitgroup.
    			s.wg.Add(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:26:10 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  3. src/net/tcpsock_test.go

    	testHookUninstaller.Do(uninstallTestHooks)
    
    	const msgLen = 512
    	conns := b.N
    	numConcurrent := runtime.GOMAXPROCS(-1) * 2
    	msgs := 1
    	if persistent {
    		conns = numConcurrent
    		msgs = b.N / conns
    		if msgs == 0 {
    			msgs = 1
    		}
    		if conns > b.N {
    			conns = b.N
    		}
    	}
    	sendMsg := func(c Conn, buf []byte) bool {
    		n, err := c.Write(buf)
    		if n != len(buf) || err != nil {
    			b.Log(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  4. src/net/http/serve_test.go

    	h := HandlerFunc(func(w ResponseWriter, r *Request) {
    		conn, _, err := w.(Hijacker).Hijack()
    		if err != nil {
    			panic(err)
    		}
    		conn.Close()
    	})
    	conn := &rwTestConn{
    		Writer: io.Discard,
    		closec: make(chan bool, 1),
    	}
    	ln := &oneConnListener{conn: conn}
    	for i := 0; i < b.N; i++ {
    		conn.Reader = bytes.NewReader(req)
    		ln.conn = conn
    		Serve(ln, h)
    		<-conn.closec
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  5. pilot/pkg/autoregistration/controller.go

    				return nil
    			}
    			conns := c.adsConnections.ConnectionsForGroup(key)
    			for _, conn := range conns {
    				proxy := conn.Proxy()
    				entryName := autoregisteredWorkloadEntryName(proxy)
    				if entryName == "" {
    					continue
    				}
    				if err := c.registerWorkload(entryName, proxy, conn.ConnectedAt()); err != nil {
    					log.Error(err)
    				}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 00:00:36 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  6. src/net/http/transport.go

    		f(w)
    	}
    }
    
    func (t *Transport) customDialTLS(ctx context.Context, network, addr string) (conn net.Conn, err error) {
    	if t.DialTLSContext != nil {
    		conn, err = t.DialTLSContext(ctx, network, addr)
    	} else {
    		conn, err = t.DialTLS(network, addr)
    	}
    	if conn == nil && err == nil {
    		err = errors.New("net/http: Transport.DialTLS or DialTLSContext returned (nil, nil)")
    	}
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 91K bytes
    - Viewed (0)
  7. src/net/net.go

    	// A zero value for t means Write will not time out.
    	SetWriteDeadline(t time.Time) error
    }
    
    type conn struct {
    	fd *netFD
    }
    
    func (c *conn) ok() bool { return c != nil && c.fd != nil }
    
    // Implementation of the Conn interface.
    
    // Read implements the Conn Read method.
    func (c *conn) Read(b []byte) (int, error) {
    	if !c.ok() {
    		return 0, syscall.EINVAL
    	}
    	n, err := c.fd.Read(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  8. src/net/http/server.go

    		return len(p), nil
    	}
    	if cw.chunking {
    		_, err = fmt.Fprintf(cw.res.conn.bufw, "%x\r\n", len(p))
    		if err != nil {
    			cw.res.conn.rwc.Close()
    			return
    		}
    	}
    	n, err = cw.res.conn.bufw.Write(p)
    	if cw.chunking && err == nil {
    		_, err = cw.res.conn.bufw.Write(crlf)
    	}
    	if err != nil {
    		cw.res.conn.rwc.Close()
    	}
    	return
    }
    
    func (cw *chunkWriter) flush() error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  9. src/net/http/h2_bundle.go

    	// An outflow is kept both on a conn and a per-stream.
    	n int32
    
    	// conn points to the shared connection-level outflow that is
    	// shared by all streams on that conn. It is nil for the outflow
    	// that's on the conn directly.
    	conn *http2outflow
    }
    
    func (f *http2outflow) setConnFlow(cf *http2outflow) { f.conn = cf }
    
    func (f *http2outflow) available() int32 {
    	n := f.n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  10. pilot/pkg/xds/adstest.go

    )
    
    func NewAdsTest(t test.Failer, conn *grpc.ClientConn) *AdsTest {
    	return NewXdsTest(t, conn, func(conn *grpc.ClientConn) (DiscoveryClient, error) {
    		xds := discovery.NewAggregatedDiscoveryServiceClient(conn)
    		return xds.StreamAggregatedResources(context.Background())
    	})
    }
    
    func NewSdsTest(t test.Failer, conn *grpc.ClientConn) *AdsTest {
    	return NewXdsTest(t, conn, func(conn *grpc.ClientConn) (DiscoveryClient, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Feb 04 03:39:42 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top