sockets - Broadcast listener using Java? -


i have dp(data processor, java code) running in network , few c clients. client needs communicate dp data exchange. client need discover dp using broadcast discovery. client broadcast message dp listen , response availability. i'm not sure how add listener in java broadcast messages, tried using datagramsocket asks port number? dp should listen broadcast message received on port.

unless clients using icmp, need port too. in normal tcp/ip stack broadcast , multicast done udp (yes, that's datagramsocket in java-speak), need port number. pick port like, of make flexible , provide configuration option both server , clients.

there other options of course dns srv records, multicast dns/bonjour, custom ip protocols, etc. harder deal with.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -