- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for connc (0.07 sec)
-
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) -
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) -
src/crypto/tls/tls.go
"net" "os" "strings" ) // Server returns a new TLS server side connection // using conn as the underlying transport. // The configuration config must be non-nil and must include // at least one certificate or else set GetCertificate. func Server(conn net.Conn, config *Config) *Conn { c := &Conn{ conn: conn, config: config, } c.handshakeFn = c.serverHandshake return c }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 12.2K bytes - Viewed (0) -
internal/grid/connection.go
} // monitorState will monitor the state of the connection and close the net.Conn if it changes. func (c *Connection) monitorState(conn net.Conn, cancel context.CancelCauseFunc) { c.connChange.L.Lock() defer c.connChange.L.Unlock() for { newState := c.State() if newState != StateConnected { conn.Close() cancel(ErrDisconnected) return } // Unlock and wait for state change.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 44.8K bytes - Viewed (0) -
internal/grid/benchmark_test.go
if src == dst { dst = (dst + 1) % len(managers) } local := managers[src] conn := local.Connection(hosts[dst]) if conn == nil { b.Fatal("No connection") } // Send the payload. t := time.Now() resp, err := conn.Request(ctx, handlerTest, payload) latency += time.Since(t).Nanoseconds() if err != nil { if debugReqs {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
src/crypto/tls/bogo_shim_test.go
} conn, err := net.Dial("tcp", net.JoinHostPort("localhost", *port)) if err != nil { log.Fatalf("dial err: %s", err) } defer conn.Close() // Write the shim ID we were passed as a little endian uint64 shimIDBytes := make([]byte, 8) byteorder.LePutUint64(shimIDBytes, *shimID) if _, err := conn.Write(shimIDBytes); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:25:39 UTC 2024 - 12.6K bytes - Viewed (0) -
pilot/test/xds/fake.go
func (f *FakeDiscoveryServer) ConnectADS() *xds.AdsTest { conn, err := grpc.Dial("buffcon", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock(), grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return f.BufListener.Dial() })) if err != nil { f.t.Fatalf("failed to connect: %v", err) } return xds.NewAdsTest(f.t, conn) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 10 16:08:52 UTC 2024 - 18.4K bytes - Viewed (0) -
internal/grid/manager.go
Payload: b, } if b, err := msg.MarshalMsg(nil); err == nil { wsutil.WriteMessage(conn, ws.StateServerSide, ws.OpBinary, b) } } } defer conn.Close() if debugPrint { fmt.Printf("grid: Upgraded request: %v\n", req.URL) } msg, _, err := wsutil.ReadClientData(conn) if err != nil { writeErr(fmt.Errorf("reading connect: %w", err)) w.WriteHeader(http.StatusForbidden)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 17:40:33 UTC 2024 - 9.8K bytes - Viewed (0) -
internal/kms/config.go
// ConnectionOptions is a structure containing options for connecting // to a KMS. type ConnectionOptions struct { CADir string // Path to directory (or file) containing CA certificates } // Connect returns a new Conn to a KMS. It uses configuration from the // environment and returns a: // // - connection to MinIO KMS if the "MINIO_KMS_SERVER" variable is present. // - connection to MinIO KES if the "MINIO_KMS_KES_ENDPOINT" is present.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 12 14:31:26 UTC 2024 - 13.9K bytes - Viewed (0) -
internal/http/listener_test.go
t.Fatalf("Test %d: error: expected = <nil>, got = %v", i+1, err) } } for _, serverAddr := range listener.Addrs() { conn, err := net.Dial("tcp", serverAddr.String()) if err != nil { t.Fatalf("Test %d: error: expected = <nil>, got = %v", i+1, err) } conn.Close() } listener.Close() } } func TestHTTPListenerAddr(t *testing.T) { if runtime.GOOS == "windows" {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 17:41:02 UTC 2024 - 11.8K bytes - Viewed (0)