# C++: Broadcast with Winsock



## Regicide (Aug 8, 2003)

I am looking to write a server that broadcasts it's ip address across a lan and then awaits for a client who found the address to connect to it. Therefore (my guess is) I will need both a UDP and TCP socket. My thinking is that I will send out the broadcast once every 10 seconds and as soon as someone connects open a new thread to handle the client. But, I am not sure how I will go about doing this as I have mainly stuck to one TCP connection that splits to handle a client. Any help/advice would be greatly appreciated.


----------

