Cheap web site hosting service by Active-Venture.com
  

 Back to Index

socketpair

socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL

Creates an unnamed pair of sockets in the specified domain, of the specified type. DOMAIN, TYPE, and PROTOCOL are specified the same as for the system call of the same name. If unimplemented, yields a fatal error. Returns true if successful.

On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptors, as determined by the value of $^F. See perlvar/$^F.

Some systems defined pipe in terms of socketpair, in which a call to pipe(Rdr, Wtr) is essentially:

 
    use Socket;
    socketpair(Rdr, Wtr, AF_UNIX, SOCK_STREAM, PF_UNSPEC);
    shutdown(Rdr, 1);        # no more writing for reader
    shutdown(Wtr, 0);        # no more reading for writer  

See perlipc for an example of socketpair use. Perl 5.8 and later will emulate socketpair using IP sockets to localhost if your system implements sockets but not socketpair.

 

  

 

Domain registration - Domain registration service and cheap domain transfer
 

Cheap domain name: Register domain name -
Register domain name services from just
$8.95/year only
 

Register domain name search -
Register domain or buy domain name registration and cheap domain transfer at low, affordable price.

© 2002-2004 Active-Venture.com Web Site Hosting Service

 

[ A computer lets you make more mistakes faster than any other invention in human history, with the possible exception of handguns and tequila.   ]

 

 
 
 

Disclaimer: This documentation is provided only for the benefits of our web hosting customers.
For authoritative source of the documentation, please refer to http://www.perldoc.com