- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 79 for Ln (0.11 sec)
-
src/net/sendfile_test.go
t.Error("internal.poll.SendFile called with unexpected FD") } } func TestSendfile(t *testing.T) { ln := newLocalListener(t, "tcp") defer ln.Close() errc := make(chan error, 1) go func(ln Listener) { // Wait for a connection. conn, err := ln.Accept() if err != nil { errc <- err close(errc) return } go func() { defer close(errc)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 12.1K bytes - Viewed (0) -
src/net/tcpsock_posix.go
} return err == syscall.EADDRNOTAVAIL } func (ln *TCPListener) ok() bool { return ln != nil && ln.fd != nil } func (ln *TCPListener) accept() (*TCPConn, error) { fd, err := ln.fd.accept() if err != nil { return nil, err } return newTCPConn(fd, ln.lc.KeepAlive, ln.lc.KeepAliveConfig, testPreHookSetKeepAlive, testHookSetKeepAlive), nil } func (ln *TCPListener) close() error { return ln.fd.Close() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:54:32 UTC 2024 - 6.3K bytes - Viewed (0) -
src/net/tcpconn_keepalive_test.go
} handler := func(ls *localServer, ln Listener) { for { c, err := ln.Accept() if err != nil { return } c.Close() } } ln := newLocalListener(t, "tcp", &ListenConfig{ KeepAlive: -1, // prevent calling hook from accepting }) ls := (&streamListener{Listener: ln}).newLocalServer() defer ls.teardown() if err := ls.buildup(handler); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 03:10:07 UTC 2024 - 4.2K bytes - Viewed (0) -
src/net/http/transport_internal_test.go
func TestTransportPersistConnReadLoopEOF(t *testing.T) { ln := newLocalListener(t) defer ln.Close() connc := make(chan net.Conn, 1) go func() { defer close(connc) c, err := ln.Accept() if err != nil { t.Error(err) return } connc <- c }() tr := new(Transport) req, _ := NewRequest("GET", "http://"+ln.Addr().String(), nil) req = req.WithT(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 15:57:17 UTC 2024 - 6.2K bytes - Viewed (0) -
src/net/unixsock_posix.go
// programs that can mess us up. // Even if there are racy calls to Close, we want to unlink only for the first one. ln.unlinkOnce.Do(func() { if ln.path[0] != '@' && ln.unlink { syscall.Unlink(ln.path) } }) return ln.fd.Close() } func (ln *UnixListener) file() (*os.File, error) { f, err := ln.fd.dup() if err != nil { return nil, err } return f, 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) -
pkg/controlplane/apiserver/config_test.go
s := (&apiserveroptions.SecureServingOptions{ BindAddress: netutils.ParseIPSloppy("127.0.0.1"), }).WithLoopback() ln, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { t.Fatalf("failed to listen on 127.0.0.1:0") } defer ln.Close() s.Listener = ln s.BindPort = ln.Addr().(*net.TCPAddr).Port opts.SecureServing = s completedOptions, err := opts.Complete(nil, nil) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 26 12:14:06 UTC 2024 - 2.5K bytes - Viewed (0) -
src/net/unixsock_windows_test.go
t.Skip("unix test") } handler := func(ls *localServer, ln Listener) {} for _, laddr := range []string{"", testUnixAddr(t)} { laddr := laddr taddr := testUnixAddr(t) ta, err := ResolveUnixAddr("unix", taddr) if err != nil { t.Fatal(err) } ln, err := ListenUnix("unix", ta) if err != nil { t.Fatal(err) } ls := (&streamListener{Listener: ln}).newLocalServer() defer ls.teardown()
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/internal/trace/testdata/testprog/stacks.go
wg.Wait() }() cv := sync.NewCond(&sync.Mutex{}) go func() { // func9 cv.L.Lock() cv.Wait() cv.L.Unlock() }() ln, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { log.Fatalf("failed to listen: %v", err) } go func() { // func10 c, err := ln.Accept() if err != nil { log.Printf("failed to accept: %v", err) return } c.Close() }() rp, wp, err := os.Pipe()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.4K bytes - Viewed (0) -
src/cmd/trace/testdata/testprog/main.go
} // checkNetworkUnblock relies on this. ln, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { log.Fatalf("listen failed: %v", err) } defer ln.Close() 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 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 17:15:58 UTC 2024 - 2.5K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress-start-stop.go
go func() { time.Sleep(time.Millisecond) timerDone <- true }() <-timerDone // A bit of network. ln, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { log.Fatalf("listen failed: %v", err) return } defer ln.Close() go func() { c, err := ln.Accept() if err != nil { return } time.Sleep(time.Millisecond) var buf [1]byte c.Write(buf[:])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0)