Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

perlfunc:socketpair

by gods
on Aug 24, 1999 at 22:43 UTC ( #360=perlfunc: print w/ replies, xml ) Need Help??

socketpair

See the current Perl documentation for socketpair.

Here is our local, out-dated (pre-5.6) version:


socketpair - create a pair of sockets



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.

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 the perlipc manpage for an example of socketpair use.


Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2014-08-30 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (289 votes), past polls