Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Design decision, call backs and network data

by BUU (Prior)
on Jul 25, 2004 at 19:23 UTC ( [id://377294]=note: print w/replies, xml ) Need Help??


in reply to Re: Design decision, call backs and network data
in thread Design decision, call backs and network data

Could you perhaps elaborate a bit? How would poe, and more specifically my "got_traffic" call back route the data, even if it knew I was requesting a response? What I have now I could just set a variable or object from my call back that says "requesting response", I'm just not sure what to do with the response.
  • Comment on Re^2: Design decision, call backs and network data

Replies are listed 'Best First'.
Re^3: Design decision, call backs and network data
by Fletch (Bishop) on Jul 25, 2004 at 21:16 UTC

    One way would be to create a separate session which handles (making something up here) "administrative requests". You specify that this session is in charge of sending and receiving any such requests. The main code posts a "get_frobnitz" event to the admin session. The admin session formulates and sends whatever request back through the communications handling session (or writes it directly to the socket's wheel). When the reply comes back an event's posted to the admin session which parses and handles it. The admin session could store the results in a shared location, or fire off another event (got_frobnitz) back to the original caller.

    At any rate take a look at any of the IRC related components and bots, as I'm sure they'd give you a better idea than my vague verbal handwaving above. :)

    • IRC Bots
    • Distributing Events, which might be of use (create a temporary handler which handles the returned data, and your communications handler fires it back when the reply is received).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://377294]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found