NAME
POE::Wheel::ListenAccept - accept connections for a listening IO::Socket
SYNOPSIS
$wheel_rw = new POE::Wheel::ReadWrite
( $kernel,
'Handle' => $handle,
'AcceptState' => $accept_state_name, # accepts accepted sockets
'ErrorState' => $error_state_name, # accepts error states
);
DESCRIPTION
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).
PUBLIC METHODS
- new POE::Wheel::ListenAccept
-
Creates a ListenAccept wheel.
$kernel
is the kernel that owns the currently running session (the session that creates this wheel).Parameters specific to ListenAccept:
- 'Handle'
-
This is the filehandle that currently is listening for connections.
- 'AcceptState'
-
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 byaccept()
. - 'ErrorState'
-
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$!
.
PRIVATE METHODS
Not for general use.
- DESTROY
-
Removes
POE::Wheel::ListenAccept
states from the parentPOE::Session
.
EXAMPLES
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.
BUGS
None known.
CONTACT AND COPYRIGHT
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:
- Around line 96:
Can't have a 0 in =over 0