Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: UDP server in POE

by Somni (Friar)
on Oct 31, 2007 at 10:35 UTC ( [id://648215]=note: print w/replies, xml ) Need Help??


in reply to UDP server in POE

The UDP entry in the POE cookbook gives a run-down of setting up a UDP client and server. The page mentions why there's no UDP server component: no one has felt the need enough to write one.

As for your broadcast question, it's been a while since I messed with UDP sockets, but can't you specify a local address of INADDR_ANY and achieve the effect you want? To get through POE::Wheel::UDP's LocalAddr argument handling you'd have to specify inet_ntoa(INADDR_ANY).

You might also want to check out POE::Wheel::Multicast, a subclass of POE::Wheel::UDP.

Replies are listed 'Best First'.
Re^2: UDP server in POE
by jczeus (Monk) on Oct 31, 2007 at 11:09 UTC

    Thanks for the help!

    Edit: having seen the example in the cookbook, I understand why there is no such thing as POE::Component::Server::UDP. I'll have to see if using POE::Wheel::UDP gives me more flexibility or not, as my app will have to be switchable between TCP (which it does already) and UDP.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found