github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/poll/sockopt.go (about)

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build unix || windows
     6  
     7  package poll
     8  
     9  import "github.com/shogo82148/std/syscall"
    10  
    11  // SetsockoptInt wraps the setsockopt network call with an int argument.
    12  func (fd *FD) SetsockoptInt(level, name, arg int) error
    13  
    14  // SetsockoptInet4Addr wraps the setsockopt network call with an IPv4 address.
    15  func (fd *FD) SetsockoptInet4Addr(level, name int, arg [4]byte) error
    16  
    17  // SetsockoptLinger wraps the setsockopt network call with a Linger argument.
    18  func (fd *FD) SetsockoptLinger(level, name int, l *syscall.Linger) error
    19  
    20  // GetsockoptInt wraps the getsockopt network call with an int argument.
    21  func (fd *FD) GetsockoptInt(level, name int) (int, error)