I'm trying to connect to devices on a network through TCP , one is a wireless device with limited capabilities (a 802.11g transceiver with an incorporated SoC ) or the client and the other is a normal pc , the server . As the client is meant to be in sleep mode as long as possible when not used i need a way for the pc to discover the client when he is active . My idea was : broadcast/multicast (but as i know from my own router multicasting isn't allowed to often, or is it?) through UDP the address and port of the server , and listen there for TCP connection requests. I figured the TCP listener out but while reading on UDP broadcast i came across some stuff i don't quite get :
1 can i use blocking sockets in the same application to broadcast on one port and send/receive on another?is there a need for a select() implementation ? here is a link to the source of my dilemma.
2 this seems much to complex for what i need , is there a better way a "best practice" approach?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.