- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 178 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/file.go
return } // FileListener returns a copy of the network listener corresponding // to the open file f. // It is the caller's responsibility to close ln when finished. // Closing ln does not affect f, and closing f does not affect ln. func FileListener(f *os.File) (ln Listener, err error) { ln, err = fileListener(f) if err != nil { err = &OpError{Op: "file", Net: "file+net", Source: nil, Addr: fileAddr(f.Name()), Err: err} } return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 09 06:14:44 UTC 2019 - 1.7K 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) -
pkg/test/echo/server/endpoint/util.go
ipBind = "tcp4" } } ln, err := tls.Listen(ipBind, net.JoinHostPort(ip, strconv.Itoa(port)), cfg) if err != nil { return nil, 0, err } port = ln.Addr().(*net.TCPAddr).Port return ln, port, nil } func listenOnUDS(uds string) (net.Listener, error) { _ = os.Remove(uds) ln, err := net.Listen("unix", uds) if err != nil { return nil, err } return ln, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 2.6K 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)