Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to make the server to only accept.... Pin
17-May-02 2:55
suss17-May-02 2:55 
GeneralRe: How to make the server to only accept.... Pin
chen27-May-02 15:57
chen27-May-02 15:57 
GeneralGet a list of clients in my LAN Pin
Rickard Andersson2016-May-02 20:37
Rickard Andersson2016-May-02 20:37 
GeneralRe: Get a list of clients in my LAN Pin
Corto Maltese16-May-02 22:00
Corto Maltese16-May-02 22:00 
GeneralRe: Get a list of clients in my LAN Pin
Rickard Andersson2016-May-02 22:21
Rickard Andersson2016-May-02 22:21 
GeneralRe: Get a list of clients in my LAN Pin
16-May-02 23:02
suss16-May-02 23:02 
GeneralRe: Get a list of clients in my LAN Pin
Rickard Andersson2017-May-02 0:07
Rickard Andersson2017-May-02 0:07 
GeneralRe: Get a list of clients in my LAN Pin
17-May-02 2:41
suss17-May-02 2:41 
Hej Rickard,
have a look into the winsock FAQ, there should be an example with UDP programming. Basically you send out a short UDP package ("ping") to everyone in the LAN (broadcast), your clients listen to it and answer with another package telling that they are alive and understand your protocol ("pong"). So you will get and collect the "pongs" and get IPs of all alive clients in the LAN. Unfortunately, UDP broadcasts will be usually filtered out on routers (at least from your ISP for heaven's sake), so maybe you will only reach client in the current LAN interface. Just give it a try.
If you need a "deep LAN broadcast" try multicast (much more modern than UDP broadcast AFAIK) or setup a central directory server or a kind of superpeer where all clients register, then you get all clients IPs in the LAN. Actually I prefer the true P2P decentralized solution, but that is your decision.
Code, sorry Im not far now still working on my GUI (again), in a few week I will hopefully find time to do UDP too. Mee me on IRC Smile | :)
/Moak
GeneralRe: Get a list of clients in my LAN Pin
Rickard Andersson2017-May-02 3:29
Rickard Andersson2017-May-02 3:29 
GeneralSetDlgMsgResult Pin
NicholasCougar16-May-02 20:26
NicholasCougar16-May-02 20:26 
GeneralRe: SetDlgMsgResult Pin
Nish Nishant16-May-02 21:45
sitebuilderNish Nishant16-May-02 21:45 
GeneralRe: SetDlgMsgResult Pin
NicholasCougar16-May-02 22:56
NicholasCougar16-May-02 22:56 
GeneralRe: SetDlgMsgResult Pin
Nish Nishant16-May-02 23:00
sitebuilderNish Nishant16-May-02 23:00 
GeneralRe: SetDlgMsgResult Pin
NicholasCougar16-May-02 23:15
NicholasCougar16-May-02 23:15 
GeneralRe: SetDlgMsgResult Pin
Nish Nishant16-May-02 23:53
sitebuilderNish Nishant16-May-02 23:53 
Questionhow to parse all links from a page? Pin
16-May-02 19:58
suss16-May-02 19:58 
QuestionHow to compare 2 very simple XML files?<oem> Pin
16-May-02 20:06
suss16-May-02 20:06 
AnswerRe: How to compare 2 very simple XML files?<oem> Pin
Christian Graus16-May-02 20:39
protectorChristian Graus16-May-02 20:39 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
16-May-02 20:40
suss16-May-02 20:40 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
Black Cat16-May-02 21:27
Black Cat16-May-02 21:27 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
16-May-02 22:50
suss16-May-02 22:50 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
Black Cat17-May-02 0:07
Black Cat17-May-02 0:07 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
17-May-02 0:36
suss17-May-02 0:36 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
Christian Graus17-May-02 1:00
protectorChristian Graus17-May-02 1:00 
GeneralRe: How to compare 2 very simple XML files?<oem> Pin
17-May-02 4:40
suss17-May-02 4:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.