- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 133 for Ln (0.04 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_plan9.go
} func (ln *TCPListener) ok() bool { return ln != nil && ln.fd != nil && ln.fd.ctl != nil } func (ln *TCPListener) accept() (*TCPConn, error) { fd, err := ln.fd.acceptPlan9() if err != nil { return nil, err } return newTCPConn(fd, ln.lc.KeepAlive, ln.lc.KeepAliveConfig, testPreHookSetKeepAlive, testHookSetKeepAlive), nil } func (ln *TCPListener) close() error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 06:04:31 UTC 2024 - 2.3K 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/tcpsock_test.go
t.Skipf("not supported on %s", runtime.GOOS) } ln, err := Listen("tcp", "127.0.0.1:0") if err != nil { t.Fatal(err) } defer ln.Close() var server Conn errc := make(chan error, 1) go func() { var err error server, err = ln.Accept() errc <- err }() client, err := Dial("tcp", ln.Addr().String()) if err != nil { t.Fatal(err) } defer client.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 06:04:31 UTC 2024 - 17.7K bytes - Viewed (0) -
src/net/timeout_test.go
case "plan9": t.Skipf("not supported on %s", runtime.GOOS) } ln := newLocalListener(t, "tcp") defer ln.Close() if err := ln.(*TCPListener).SetDeadline(noDeadline); err != nil { t.Error(err) } if err := ln.(*TCPListener).SetDeadline(time.Now().Add(10 * time.Millisecond)); err != nil { t.Error(err) } c, err := ln.Accept() if err == nil { c.Close() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 18:06:55 UTC 2024 - 30K bytes - Viewed (0) -
src/net/rawconn_test.go
} t.Run("TCP", func(t *testing.T) { ln := newLocalListener(t, "tcp") defer ln.Close() cc1, err := ln.(*TCPListener).SyscallConn() if err != nil { t.Fatal(err) } if err := controlRawConn(cc1, ln.Addr()); err != nil { t.Fatal(err) } c, err := Dial(ln.Addr().Network(), ln.Addr().String()) if err != nil { t.Fatal(err) } defer c.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 4.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/protoconn_test.go
if err != nil { t.Fatal(err) } ln, err := ListenTCP("tcp4", la) if err != nil { t.Fatal(err) } defer ln.Close() ln.Addr() mustSetDeadline(t, ln.SetDeadline, 30*time.Nanosecond) if c, err := ln.Accept(); err != nil { if !err.(Error).Timeout() { t.Fatal(err) } } else { c.Close() } if c, err := ln.AcceptTCP(); err != nil { if !err.(Error).Timeout() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 7.4K bytes - Viewed (0) -
src/net/net_test.go
t.Skipf("network %s is not testable on the current platform", network) } t.Parallel() ln := newLocalListener(t, network) switch network { case "unix", "unixpacket": defer os.Remove(ln.Addr().String()) } defer ln.Close() c, err := Dial(ln.Addr().Network(), ln.Addr().String()) if err != nil { t.Fatal(err) } switch network { case "unix", "unixpacket":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 21:04:44 UTC 2024 - 13.3K bytes - Viewed (0) -
src/net/tcpsock_unix_test.go
t.Skip("skipping in short mode") } ln := newLocalListener(t, "tcp") var wg sync.WaitGroup wg.Add(1) go func(ln Listener) { defer wg.Done() for { c, err := ln.Accept() if err != nil { return } wg.Add(1) go func(c Conn) { var b [1]byte c.Read(b[:]) c.Close() wg.Done() }(c) } }(ln) attempts := int(1e4) // larger is better
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 2.3K bytes - Viewed (0)