Hi Mike, thanks for your reply.

The nice editors from perl.com fixed the download link after I mailed them.
The downloaded code clears up alot of things.
The wheel-id from POE::Wheel::SocketFactory is indeed the same throughout the whole program run.
Only the wheel-id in POE::Wheel:ReadWrite is different for each connection. This is the only wheel-id that needs to be stored (and destroyed).

I changed subroutines 'factory_success' and 'client_input' accordingly and it works now!

The code in the perl.com article and the code made available through the download link are different from each other which is a confusing for a POE newbie like me ;-)

sub factory_success { my $handle = $_[ARG0]; my $wheel_id = POE::Wheel::ReadWrite->new( Handle => $handle, Driver => POE::Dri +ver::SysRW->new(), Filter => POE::Fil +ter::SimpleQueryString->new(), InputEvent => 'client_ +input', ); $_[HEAP]->{clients}->{$wheel_id->ID} = $wheel_id; } sub client_input { my ($input, $wheel_id) = @_[ARG0, ARG1]; use Data::Dumper; print Dumper $input; $_[HEAP]->{clients}->{$wheel_id}->put($input); }

In reply to Re^4: POE method problem (building applications with POE) by Orchid_NL
in thread POE method problem (building applications with POE) by Orchid_NL

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.