Implementing some broadcast udp protocol
I need to implement udp protocol in Win Forms that send some request to the broadcast address from specific port and then change to be client and receive multiple answers from the broadcast on the same specific port.
My questions are:
1.Is the first connection should use blocking (synchronous) functions ?
2.Should I close this first socket,and then open another one on the same port in order to get the broadcast answers ?
3.In which way should I get the broadcast answers:a.using asynchronous function and events like BeginSend/EndSend etc or b.using threads ?
4.How do I get multiple answers on the same port in this case ?
I will be glad to get answers/code snippets.