Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

Tools

setsockopt

Perl 5 version 8.8 documentation
Recently read

setsockopt

  • setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL

    Sets the socket option requested. Returns undefined if there is an error. Use integer constants provided by the Socket module for LEVEL and OPNAME. Values for LEVEL can also be obtained from getprotobyname. OPTVAL might either be a packed string or an integer. An integer OPTVAL is shorthand for pack("i", OPTVAL).

    An example disabling the Nagle's algorithm for a socket:

    1. use Socket qw(IPPROTO_TCP TCP_NODELAY);
    2. setsockopt($socket, IPPROTO_TCP, TCP_NODELAY, 1);