in reply to Re: POE yield not working
in thread POE yield not working
The rest of the code tracks wheels by their IDs. It might be more consistent and easier overall to pass the wheel ID instead of the reference. For example, if something destroys the object (deletes the wheel), the ID to object lookup will detect that it's gone away.Do you mean to rather use
instead of passing it to the variable $io_wheel?on_connect => sub { # Begin interacting with the server. my ( $kernel, $client_socket ) = @_[KERNEL, ARG0 ]; $_[HEAP]{client} = POE::Wheel::ReadWrite->new( Handle => $client_socket, InputEvent => "on_receive_data", ErrorEvent => "on_connect_error", ); $_[HEAP]{client}->put( "login monitor monitor", "log on", +); $kernel->yield( 'keepalive', $_[HEAP]{client} ); },
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: POE yield not working
by rcaputo (Chaplain) on Feb 10, 2013 at 15:09 UTC | |
|
Re^3: POE yield not working
by rcaputo (Chaplain) on Feb 10, 2013 at 15:02 UTC |