how to make server to listen to unicast as well broadcast requests

is it possible to code a server that listens for broadcast as well unicast requests ??
If so please suggest how to do the same ?

Thanks
Gopi Krishna P

You mean, unicast packets not directed at it? That's possible but system-dependent. In linux you can set network interfaces or sockets to "promiscuous mode" which will respond to anything, not just packets they're the intended receiver of. Some details here. It's better to set that mode on a socket than an interface, since if you enable it on an interface you have to turn it off later...

Modern packet-switching systems usually won't send you packets that don't belong to you anyway, though. A hub will, a switch won't.

I want a socket to wait for unicast and broadcast requests to be processed.
is it possible to wait for both unicast and braodcast requests ?