Jump to content

Perl Programming/Keywords/socketpair

From Wikibooks, open books for an open world
Previous: socket Keywords Next: sort

The socketpair keyword

[edit | edit source]

The socketpair function creates an unnamed pair of sockets in the specified domain, of the specified type. The parametres DOMAIN, TYPE, and PROTOCOL are specified the same as for the syscall of the same name. If unimplented, an exception is raised, or returns true on success.

Syntax

[edit | edit source]
  socket SOCKET1, SOCKET2, DOMAIN, TYPE, PROTOCOL

Examples

[edit | edit source]
use Socket;

socketpair(Rdr, Wtr, AF_UNIX, SOCK_STREAM, PF_UNSPEC);

See also

[edit | edit source]
Previous: socket Keywords Next: sort