1,105,334 Community Members

windows sockets best practice, advice needed

Member Avatar
emperor43
Newbie Poster
2 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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?

Member Avatar
emperor43
Newbie Poster
2 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

found what i needed :D just 3 hours of searching and 4 hours of reading , pretty fast .. for any other endeavourer http://www.winsocketdotnetworkprogramming.com/winsock2programming/

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: