Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day xtpu2, [Disclaimer: I haven't used AnyEvent previously. The following information was gleaned from its (and AnyEvent::Intro's) documentation.] "It is obvious that $w->recv is the culprit because if I comment out that line, the server works and outputs 'got your message' when I send a message to it. However, in that case the timer doesn't work." This may only be part of the story, but it might help resolve the AnyEvent issue. You're calling recv() on a time watcher when it should be called on a condition variable. Also, you'll need a send() method in your timer callback. Here's a minimal example intended to roughly mirror the AnyEvent part of the code you posted:
Output:
-- Ken In reply to Re: PSGI, Plack, Twiggy, AnyEvent and SockJS... I need help
by kcott
|
|