- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for fd (0.03 sec)
-
internal/http/dial_linux.go
c.Control(func(fdPtr uintptr) { // got socket file descriptor to set parameters. fd := int(fdPtr) _ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEADDR, 1) _ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEPORT, 1) // Enable custom socket send/recv buffers. if opts.SendBufSize > 0 { _ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_SNDBUF, opts.SendBufSize) } if opts.RecvBufSize > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 23 10:53:03 UTC 2024 - 5K bytes - Viewed (0) -
cni/pkg/nodeagent/netns_linux.go
} return &NetnsWrapper{innerNetns: n, inode: i}, nil } func NetnsSet(n NetnsFd) error { if err := unix.Setns(int(n.Fd()), unix.CLONE_NEWNET); err != nil { return fmt.Errorf("Error switching to ns fd %v: %v", n.Fd(), err) } return nil } // inspired by netns.Do() but with an existing fd. func NetnsDo(fdable NetnsFd, toRun func() error) error { containedCall := func() error { threadNS, err := netns.GetCurrentNS()
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Jan 31 10:05:36 UTC 2024 - 2.7K bytes - Viewed (0) -
cni/pkg/nodeagent/netns.go
import "io" type NetnsFd interface { Fd() uintptr } type Netns interface { NetnsFd Inode() uint64 } type NetnsCloser interface { io.Closer Netns } type NetnsWithFd struct { netns io.Closer fd uintptr inode uint64 } func (n *NetnsWithFd) Close() error { if n.netns == nil { return nil } ret := n.netns.Close()
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 1.2K bytes - Viewed (0) -
cmd/os_unix.go
} return nil } // openFileWithFD return 'fd' based file descriptor func openFileWithFD(name string, flag int, perm os.FileMode) (fd int, err error) { switch flag & writeMode { case writeMode: defer updateOSMetrics(osMetricOpenFileWFd, name)(err) default: defer updateOSMetrics(osMetricOpenFileRFd, name)(err) } var e error fd, e = syscall.Open(name, flag|syscall.O_CLOEXEC, uint32(perm)) if e != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.3K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver.go
data, err := proto.Marshal(msg) if err != nil { return nil, err } return z.sendDataAndWaitForAck(data, fd) } func (z *ZtunnelConnection) sendDataAndWaitForAck(data []byte, fd *int) (*zdsapi.WorkloadResponse, error) { var rights []byte if fd != nil { rights = unix.UnixRights(*fd) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Jul 29 16:08:35 UTC 2024 - 13.2K bytes - Viewed (0) -
cni/pkg/nodeagent/fakes_test.go
type fakeNs struct { closed *atomic.Bool fd uintptr inode uint64 } func newFakeNs(fd uintptr) *fakeNs { // the fake inode is the fd! magic. return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)} } func newFakeNsInode(fd uintptr, inode uint64) *fakeNs { return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode} } // Fd returns the file descriptor func (f *fakeNs) Fd() uintptr {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jun 28 23:33:46 UTC 2024 - 3.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
@Test fun testFileDescriptor() { assertOnFileDescriptor { fd -> val requestBody = fd.toRequestBody() assertThat(requestBody.contentLength()).isEqualTo(-1L) assertThat(requestBody.isOneShot()).isEqualTo(true) } } @Test fun testFileDescriptorRead() { assertOnFileDescriptor(content = "Hello") { fd -> val requestBody = fd.toRequestBody() val buffer = Buffer()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.6K bytes - Viewed (0) -
lib/wasm/wasm_exec.js
return; } const n = this.writeSync(fd, buf); callback(null, n); }, chmod(path, mode, callback) { callback(enosys()); }, chown(path, uid, gid, callback) { callback(enosys()); }, close(fd, callback) { callback(enosys()); }, fchmod(fd, mode, callback) { callback(enosys()); }, fchown(fd, uid, gid, callback) { callback(enosys()); }, fstat(fd, callback) { callback(enosys()); },
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Aug 30 19:15:21 UTC 2024 - 16.5K bytes - Viewed (0) -
cni/pkg/nodeagent/podcgroupns.go
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 11K bytes - Viewed (0) -
cni/pkg/nodeagent/ztunnelserver_test.go
mt.Assert(ztunnelConnected.Name(), nil, monitortest.Exactly(1)) // we should get the fd to dev null. note that we can't assert the fd number // as the kernel may have given us a different number that refers to the same file. assert.Equal(t, len(fds), 1) // in theory we should close the fd, but it's just a test.. assert.Equal(t, m.Payload.(*zdsapi.WorkloadRequest_Add).Add.Uid, uid)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 8.6K bytes - Viewed (0)