Re: POE sessions, clients, confused
Hi, On vrijdag, jan 28, 2005, at 03:10 Europe/Amsterdam, Rocco Caputo wrote: On Thu, Jan 27, 2005 at 12:40:56PM -0800, David Davis wrote: Response below. On Thu, 27 Jan 2005 20:15:22 +0100, Bas Schulte [EMAIL PROTECTED] wrote: Hi David, On donderdag, jan 27, 2005, at 00:45 Europe/Amsterdam, David Davis wrote: Don't pass the client wheel, that's bad when using post. Argh. I don't understand why I can't pass the reference to the wheel though. Why is it bad? It has to do with garbage collection. Wheels are linked to the session, and if you want to have it properly clean up and disconnect, don't pass it around. Rocco, please chime in if I'm wrong. Here's a previous message where I explained it: http://aspn.activestate.com/ASPN/Mail/Message/2096709 In that message, it says this: Rather, you create an event handler for your TCP connections. The handler accepts messages from the outside and transmits their payloads from within the proper context. It's as if the session has opened a port through which data can enter its context. (with some more explanation) Right. There we have it :) When the ClientInput state runs, it receives a command from the client, the (translated) command is sent to another session like this: $kernel-post($heap-{controllingSession}, 'do_the_actual_start', $with_parameter_1, $and_parameter_2); Then in the do_the_actual_start state, this gets the parameters: sub controller_start { my ($kernel, $heap, $session, $parameter1, $parameter2) = @_[KERNEL, HEAP, SESSION, ARG0, ARG1]; # do the POE::Wheel::Run thing here # And send response via client tcp session (the SENDER): $kernel-post($_[SENDER] = send_response = OK); } Thanks all for the learning experience! Cheers, Bas.
POE on OSX
has anyone successfully installed POE on OSX? I'm failing the test suite for the latest available with the following: Running make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/lib -Iblib/arch test.pl tests/10_units/01_preprocessor/01_preprocessor..ok tests/10_units/01_preprocessor/02_macro_usebytesok tests/10_units/02_pipes/01_base.skipped all skipped: not implemented yet tests/10_units/02_pipes/02_oneway...skipped all skipped: not implemented yet tests/10_units/02_pipes/03_twoway...skipped all skipped: not implemented yet tests/10_units/03_base/01_poe...ok tests/10_units/03_base/02_api_resloader.ok tests/10_units/03_base/03_component.ok tests/10_units/03_base/04_driverok tests/10_units/03_base/05_filterok tests/10_units/03_base/06_loop..ok tests/10_units/03_base/07_queue.ok tests/10_units/03_base/08_resource..ok tests/10_units/03_base/09_resources.skipped all skipped: not implemented yet tests/10_units/03_base/10_wheel.ok tests/10_units/03_base/11_assert_usage..ok tests/10_units/03_base/12_assert_retval.ok tests/10_units/03_base/13_assert_data...ok tests/10_units/03_base/14_kernelok tests/10_units/04_drivers/01_sysrw..ok tests/10_units/05_filters/01_block..ok tests/10_units/05_filters/02_grep...skipped all skipped: not implemented yet tests/10_units/05_filters/03_http...ok 7/56 skipped: PUT not supported yet. tests/10_units/05_filters/04_line...ok tests/10_units/05_filters/05_mapskipped all skipped: not implemented yet tests/10_units/05_filters/06_recordblockskipped all skipped: not implemented yet tests/10_units/05_filters/07_reference..ok tests/10_units/05_filters/08_stream.ok tests/10_units/05_filters/50_stackable..ok tests/10_units/05_filters/99_filterchange...ok tests/10_units/06_queues/01_array...ok tests/20_resources/10_perl/aliases..ok tests/20_resources/10_perl/caller_state.ok tests/20_resources/10_perl/controls.ok tests/20_resources/10_perl/events...ok tests/20_resources/10_perl/extrefs..ok tests/20_resources/10_perl/filehandles..ok tests/20_resources/10_perl/sessions.ok tests/20_resources/10_perl/sids.ok tests/20_resources/10_perl/signals..ok tests/20_resources/10_perl/statistics...skipped all skipped: not implemented yet tests/30_loops/10_select/all_errors.skipped all skipped: most of these should move into other tests tests/30_loops/10_select/comp_tcp...ok tests/30_loops/10_select/k_alarms...ok 31/37 # Failed test (tests/30_loops/00_base/k_alarms.pm at line 167) tests/30_loops/10_select/k_alarms...ok 37/37# Looks like you failed 1 test of 37. tests/30_loops/10_select/k_alarms...dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 36 Failed 1/37 tests, 97.30% okay tests/30_loops/10_select/k_aliases..ok tests/30_loops/10_select/k_detach...ok tests/30_loops/10_select/k_selects..ok tests/30_loops/10_select/k_signals..ok 2/8# Waiting 2 seconds for child processes to settle. tests/30_loops/10_select/k_signals..ok tests/30_loops/10_select/ses_nfaok tests/30_loops/10_select/ses_sessionok tests/30_loops/10_select/wheel_accept...FAILED test 3 Failed 1/4 tests, 75.00% okay tests/30_loops/10_select/wheel_run..ok tests/30_loops/10_select/wheel_sf_ipv6.. *** *** This test may hang if your firewall blocks IPv6 *** packets across your localhost interface. *** tests/30_loops/10_select/wheel_sf_ipv6..ok tests/30_loops/10_select/wheel_sf_tcp...ok tests/30_loops/10_select/wheel_sf_udp...ok tests/30_loops/10_select/wheel_sf_unix..ok tests/30_loops/10_select/wheel_tail.ok tests/30_loops/20_poll/all_errors...skipped all skipped: most of these should move into other tests tests/30_loops/20_poll/comp_tcp.ok tests/30_loops/20_poll/k_alarms.NOK 36 # Failed test (tests/30_loops/00_base/k_alarms.pm at line 167) tests/30_loops/20_poll/k_alarms.ok 37/37# Looks like you failed 1 test of 37. tests/30_loops/20_poll/k_alarms.dubious Test returned status 1 (wstat 256, 0x100) DIED.