There are probably more topical resources for POE help, like POE's mailing list or irc.perl.org channel #poe, depending whether you prefer long-form answers or quicker, specific assistance. There's also POE's wiki, which includes this introductory article and a Cookbook with several examples.

POE is a callback-based event reactor. When something happens, such as when data appears on a socket, POE's Kernel notifies your code that it can safely read from the socket. POE::Kernel's API hides the details of several event loops, including low-level loops like Ev, and high-level graphical toolkits like Prima.

POE's callback model may be confusing because it's name-based rather than code-reference based. Named events make certain things easier, like mapping events to any kind of callback, and dynamically loading or reloading callbacks as needed. Some people store their objects in a database and load them (or reload them) as needed. Most people don't use the feature, though.

POE::Session objects do a few different things, but they mainly act as namespaces for events. Multiple parts of a program can use the same event names, as long as each has a separate session. For example, multiple classes might use the same event name. It would be bad if they got each others' callbacks.

That's a very basic, very high level synopsis of the two main POE classes. If you have more specific questions, I'll be happy to try answering them.


In reply to Re: POE and Websockets by rcaputo
in thread POE and Websockets by cavac

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.