• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to a do broadcast udp with java nio  RSS feed

Douglas Gardiner
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did some looking but I do not see anything obvious on how to send a broadcast out using the java nio package. With the older DatagramSocket class there is a method to setBroadcast() which allows me to do this. There doesn't seem to be anything so obvious with the DatagramChannel class in order to accomplish this. My application, when started sends out a broadcast but also need to be able to listen to other peers on that port and then start communications. I'm not using Multicast since accesslist forbid it, and only need something within the local subnet.

Does anyone know how I am supposed to accomplish this with the java nio library?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!