- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 127 for remoteaddr (0.19 sec)
-
src/net/iprawsock_test.go
t.Skipf("skipping %s test: %v", network, err) } else if err != nil { t.Fatal(err) } defer c.Close() if !reflect.DeepEqual(raddr, c.RemoteAddr()) { t.Fatalf("got %#v; want %#v", c.RemoteAddr(), raddr) } } func TestDialListenIPArgs(t *testing.T) { type test struct { argLists [][2]string shouldFail bool } tests := []test{ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 6K bytes - Viewed (0) -
src/net/http/cgi/child.go
} r.URL = url } // Request.RemoteAddr has its port set by Go's standard http // server, so we do here too. remotePort, _ := strconv.Atoi(params["REMOTE_PORT"]) // zero if unset or invalid r.RemoteAddr = net.JoinHostPort(params["REMOTE_ADDR"], strconv.Itoa(remotePort)) return r, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 5.5K bytes - Viewed (0) -
pkg/test/echo/server/endpoint/tcp.go
go func() { for { conn, err := listener.Accept() if err != nil { epLog.Warn("TCP accept failed: " + err.Error()) return } id := uuid.New() epLog.WithLabels("remote", conn.RemoteAddr(), "id", id).Infof("TCP Request") done := make(chan struct{}) go func() { s.echo(id, conn) close(done) }() go func() { select { case <-done: return
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 16:20:31 UTC 2023 - 5.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization_test.go
APIVersion: "v1", Namespace: "myns", Resource: "jobs", }, }, } for k, tc := range testcases { req, _ := http.NewRequest(tc.Verb, tc.Path, nil) req.RemoteAddr = "127.0.0.1" var attribs authorizer.Attributes var err error var handler http.Handler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { ctx := req.Context()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 5K bytes - Viewed (0) -
internal/grid/manager.go
fmt.Printf("grid: Got a %s request for: %v\n", req.Method, req.URL) } ctx := req.Context() if err := m.authRequest(req); err != nil { gridLogOnceIf(ctx, fmt.Errorf("auth %s: %w", req.RemoteAddr, err), req.RemoteAddr) w.WriteHeader(http.StatusForbidden) return } conn, _, _, err := ws.UpgradeHTTP(req, w) if err != nil { if debugPrint {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 17:40:33 UTC 2024 - 9.8K bytes - Viewed (0) -
pkg/util/net/ip.go
} } return } // IsRequestFromLocalhost returns true if request is from localhost address. func IsRequestFromLocalhost(r *http.Request) bool { ip, _, err := net.SplitHostPort(r.RemoteAddr) if err != nil { return false } userIP := net.ParseIP(ip) return userIP.IsLoopback()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 01 14:41:40 UTC 2024 - 2.4K bytes - Viewed (0) -
pkg/hbone/server.go
hs := &http.Server{ Handler: h2c.NewHandler(handler, h2Server), } return hs } func handleConnect(w http.ResponseWriter, r *http.Request) bool { t0 := time.Now() log.WithLabels("host", r.Host, "source", r.RemoteAddr).Info("Received CONNECT") // Send headers back immediately so we can start getting the body w.(http.Flusher).Flush() ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Nov 10 02:05:07 UTC 2022 - 2.4K bytes - Viewed (0) -
pkg/kubelet/prober/scale_test.go
visitors := map[string]struct{}{} go http.Serve(ln, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { mu.Lock() defer mu.Unlock() if _, ok := visitors[r.RemoteAddr]; !ok { atomic.AddInt64(&f.numConnection, 1) visitors[r.RemoteAddr] = struct{}{} } })) } else { go func() { for { conn, err := ln.Accept() if err != nil { // exit when the listener is closed
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 16 16:33:01 UTC 2023 - 8.2K bytes - Viewed (0) -
src/net/unixsock_windows_test.go
t.Fatal(err) } if laddr == "" { laddr = "@" } var connAddrs = [3]struct{ got, want Addr }{ {ln.Addr(), ta}, {c.LocalAddr(), &UnixAddr{Name: laddr, Net: "unix"}}, {c.RemoteAddr(), ta}, } for _, ca := range connAddrs { if !reflect.DeepEqual(ca.got, ca.want) { t.Fatalf("got %#v, expected %#v", ca.got, ca.want) } } } } func TestModeSocket(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 12 17:24:57 UTC 2024 - 1.8K bytes - Viewed (0) -
src/net/packetconn_test.go
defer closer(c1, tt.net, tt.addr1, tt.addr2) c1.LocalAddr() c2, err := Dial(tt.net, c1.LocalAddr().String()) if err != nil { t.Fatal(err) } defer c2.Close() c2.LocalAddr() c2.RemoteAddr() if _, err := c2.Write(wb); err != nil { t.Fatal(err) } rb1 := make([]byte, 128) if _, _, err := c1.ReadFrom(rb1); err != nil { t.Fatal(err) } var dst Addr switch tt.net {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 3K bytes - Viewed (0)