- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for fileConn (0.23 sec)
-
src/net/unixsock_readmsg_test.go
defer writeFile.Close() readFile := os.NewFile(uintptr(fds[1]), "read-socket") defer readFile.Close() cw, err := FileConn(writeFile) if err != nil { t.Fatalf("FileConn: %v", err) } defer cw.Close() cr, err := FileConn(readFile) if err != nil { t.Fatalf("FileConn: %v", err) } defer cr.Close() ucw, ok := cw.(*UnixConn) if !ok { t.Fatalf("got %T; want UnixConn", cw) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 18 09:15:25 UTC 2023 - 2.5K bytes - Viewed (0) -
src/syscall/creds_test.go
cliFile := os.NewFile(uintptr(fds[1]), "client") defer srvFile.Close() defer cliFile.Close() srv, err := net.FileConn(srvFile) if err != nil { t.Errorf("FileConn: %v", err) return } defer srv.Close() cli, err := net.FileConn(cliFile) if err != nil { t.Errorf("FileConn: %v", err) return } defer cli.Close() var ucred syscall.Ucred if os.Getuid() != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 17 02:43:05 UTC 2022 - 3.4K bytes - Viewed (0) -
src/net/file.go
package net import "os" // BUG(mikio): On JS and Windows, the FileConn, FileListener and // FilePacketConn functions are not implemented. type fileAddr string func (fileAddr) Network() string { return "file+net" } func (f fileAddr) String() string { return string(f) } // FileConn returns a copy of the network connection corresponding to // the open file f.
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/file_windows.go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package net import ( "os" "syscall" ) func fileConn(f *os.File) (Conn, error) { // TODO: Implement this return nil, syscall.EWINDOWS } func fileListener(f *os.File) (Listener, error) { // TODO: Implement this return nil, syscall.EWINDOWS }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 02 16:11:03 UTC 2015 - 521 bytes - Viewed (0) -
src/net/file_stub.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build js package net import ( "os" "syscall" ) func fileConn(f *os.File) (Conn, error) { return nil, syscall.ENOPROTOOPT } func fileListener(f *os.File) (Listener, error) { return nil, syscall.ENOPROTOOPT }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 481 bytes - Viewed (0) -
src/net/file_wasip1_test.go
// license that can be found in the LICENSE file. //go:build wasip1 package net import ( "syscall" "testing" ) // The tests in this file intend to validate the ability for net.FileConn and // net.FileListener to handle both TCP and UDP sockets. Ideally we would test // the public interface by constructing an *os.File from a file descriptor
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 13 21:06:56 UTC 2023 - 3.8K bytes - Viewed (0) -
src/syscall/syscall_unix_test.go
if len(out) > 0 || err != nil { t.Fatalf("child process: %q, %v", out, err) } c, err := net.FileConn(readFile) if err != nil { t.Fatalf("FileConn: %v", err) } defer c.Close() uc, ok := c.(*net.UnixConn) if !ok { t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c) } buf := make([]byte, 32) // expect 1 byte oob := make([]byte, 32) // expect 24 bytes
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 29 16:24:51 UTC 2022 - 9.4K bytes - Viewed (0) -
src/net/file_test.go
t.Error(perr) } t.Fatal(err) } c2, err := FileConn(f) if err := f.Close(); err != nil { t.Error(err) } if err != nil { if perr := parseCommonError(err); perr != nil { t.Error(perr) } t.Fatal(err) } defer c2.Close() if _, err := c2.Write([]byte("FILECONN TEST")); err != nil { if perr := parseWriteError(err); perr != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 6.4K bytes - Viewed (0) -
src/net/file_wasip1.go
return nil, err } pfd := f.PollFD().Copy() fd := newPollFD(net, pfd) if err := fd.init(); err != nil { pfd.Close() return nil, err } return newFileListener(fd), nil } func fileConn(f *os.File) (Conn, error) { filetype, err := fd_fdstat_get_type(f.PollFD().Sysfd) if err != nil { return nil, err } net, err := fileConnNet(filetype) if err != nil { return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 12 23:11:39 UTC 2023 - 2.2K bytes - Viewed (0) -
src/net/file_unix.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 06:04:31 UTC 2024 - 2.5K bytes - Viewed (0)