Name
accept
Synopsis
accept ([pkg
])
Performs the accept
system call on a socket and
returns a new object. The new object is created in the same
class as the listen socket, unless
pkg
is specified. The object can be
used to communicate with the client that tried to connect. In a
scalar context, the new socket is returned, or undef
is returned on failure. In an
array context, a two-element array is returned containing the
new socket and the peer address, or an empty list is returned on
failure.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.