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.