diotalevi has asked for the wisdom of the Perl Monks concerning the following question:
The following error occurs when I run this script. The AddPublisher state is declared in POE::Component::Server::TCP->create( InlineStates => { ... } ). What is wrong that I am getting this error and why is it not triggering a fatal assertion?
a 'AddPublisher' state was sent from poe at 13 to session 2, but sessi +on 2 has neither that state nor a _default state to handle it POE::Component::Server::TCP->new( Alias => 'TCPServer', ... InlineStates => { AddPublisher => sub {} } ; $_[KERNEL]->post( TCPServer => AddPublisher => $_[SESSION], 1 ); },
The script at ~diotalevi/poe2
sub POE::Kernel::ASSERT_DEFAULT () { 1 } use POE qw( Session Component::Server::TCP ); POE::Component::Server::TCP->new( Alias => 'TCPServer', Port => 53511, InlineStates => { AddPublisher => sub {} }, ClientInput => sub {} ); POE::Session->create( inline_states => { _start => sub { $_[KERNEL]->post( TCPServer => AddPublisher => $_[SESSION], 1 ); }, _stop => sub {} } ); POE::Kernel->run;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Missing event from InlineStates in POE::Component::Server::TCP
by rcaputo (Chaplain) on Jul 06, 2004 at 16:31 UTC | |
by diotalevi (Canon) on Jul 06, 2004 at 16:53 UTC | |
by rcaputo (Chaplain) on Jul 06, 2004 at 17:17 UTC |