O'Reilly logo

Perl Pocket Reference, 5th Edition by Johan Vromans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Networking

accept newsocket, listeningsocket

Accepts a new socket. If newsocket is an uninitialized scalar variable, a new, unique handle is automatically created.

bind socket, name

Binds the name to the socket.

connect socket, name

Connects a socket to the named peer.

getpeername socket

Returns the socket address of the other end of the socket.

getsockname socket

Returns the name of the socket.

getsockopt socket, level, optname

Returns the socket options.

listen socket, queuesize

Starts listening on the specified socket, allowing queuesize connections.

recv socket, $var, length, flags

Receives a message of length characters on the socket and puts it into scalar variable $var.

send socket, msg, flags [ , to ]

Sends a message on the socket.

setsockopt socket, level, optname, optval

Sets the requested socket option.

shutdown socket, how

Shuts the socket down.

socket socket, domain, type, protocol

Creates a socket in the domain with the given type and protocol. If socket is an uninitialized scalar variable, a new, unique handle is created.

socketpair socket1, socket2, domain, type, protocol

Works the same as socket, but creates a pair of bidirectional sockets.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required