POE::Wheel::ListenAccept - accept connections for a listening IO::Socket
IO::Socket
$wheel_rw = new POE::Wheel::ReadWrite ( $kernel, 'Handle' => $handle, 'AcceptState' => $accept_state_name, # accepts accepted sockets 'ErrorState' => $error_state_name, # accepts error states );
POE::Wheel::ListenAccept manages a listening IO::Socket and accepts new connections. Successfully connections are passed to 'AcceptState' for custom processing (for example, creating a new POE::Session to interact with the socket).
POE::Wheel::ListenAccept
POE::Session
Creates a ListenAccept wheel. $kernel is the kernel that owns the currently running session (the session that creates this wheel).
$kernel
Parameters specific to ListenAccept:
This is the filehandle that currently is listening for connections.
This names the event that will be sent to the current session whenever a connection is accepted.
'InputState' handlers will receive these parameters: $kernel, $namespace, $origin_session, $new_socket. The first three are standard; the last is a filehandle for the socket created by accept().
$namespace
$origin_session
$new_socket
accept()
This names the event that will receive notification of any errors that occur while trying to accept a connection.
'ErrorState' handlers will these parameters: $kernel, $namespace, $origin_session, $operation, $errnum, $errstr. The first three are standard; $operation is either 'read' or 'write'; $errnum is ($!+0); $errstr is $!.
$operation
$errnum
$errstr
($!+0)
$!
Not for general use.
Removes POE::Wheel::ListenAccept states from the parent POE::Session.
Please see tests/wheels.perl for an example of POE::Wheel::ListenAccept. Also see tests/selects.perl to see the non-wheel way to do things.
None known.
Copyright 1998 Rocco Caputo <troc@netrus.net>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Can't have a 0 in =over 0
To install POE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE
CPAN shell
perl -MCPAN -e shell install POE
For more information on module installation, please visit the detailed CPAN module installation guide.