Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Send a message over a socketClose down just half of a sock ... (Berikutnya)
Low-level socket functions

Set some socket options

Daftar Isi

  • setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL

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

    An example disabling Nagle's algorithm on a socket:

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

    Portability issues: setsockopt in perlport.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Send a message over a socketClose down just half of a sock ... (Berikutnya)