I need help with UDP broadcasting

Hi

I have one app which sends UDP datagrams in broadcast mode on some port. But I need to receive these datagrams in klient app on same PC on same port number. Can somebody advise me, how i need to set sockets (adress, ports ) to do it? I usually got error code WSAEADDRINUSE. I use VC++ 6.0. I will be glad for some useful link, or sample code about UDP programing in VC++ 6.0

Thanks

Radek
[418 byte] By [Radek72] at [2007-11-19 17:46:43]
# 1 Re: I need help with UDP broadcasting
Only one usage of each socket address (protocol/IP address/port) is normally permitted. This error occurs if an application attempts to bind a socket to an IP address/port that has already been used for an existing socket, or a socket that wasn't closed properly, or one that is still in the process of closing. For server applications that need to bind multiple sockets to the same port number, consider using setsockopt(SO_REUSEADDR).If u can change ur broadcast port number then u can resolve that problem easily.
Naumaan at 2007-11-9 13:52:04 >
# 2 Re: I need help with UDP broadcasting
thanks for advise, it works

Radek
Radek72 at 2007-11-9 13:53:04 >