Click here to Skip to main content
11,502,559 members (65,538 online)

C / C++ / MFC

 
AnswerRe: how to make this working: srand(time(NULL)); Pin
Richard Andrew x6425-Sep-13 13:12
professionalRichard Andrew x6425-Sep-13 13:12 
QuestionCRegKey read from registry? Pin
bosfan25-Sep-13 6:19
memberbosfan25-Sep-13 6:19 
AnswerRe: CRegKey read from registry? Pin
Richard Andrew x6425-Sep-13 7:47
professionalRichard Andrew x6425-Sep-13 7:47 
GeneralRe: CRegKey read from registry? Pin
bosfan25-Sep-13 21:46
memberbosfan25-Sep-13 21:46 
AnswerRe: CRegKey read from registry? Pin
Richard MacCutchan25-Sep-13 21:37
mvpRichard MacCutchan25-Sep-13 21:37 
GeneralRe: CRegKey read from registry? Pin
bosfan25-Sep-13 21:45
memberbosfan25-Sep-13 21:45 
GeneralRe: CRegKey read from registry? Pin
Richard MacCutchan25-Sep-13 22:03
mvpRichard MacCutchan25-Sep-13 22:03 
GeneralRe: CRegKey read from registry? Pin
bosfan25-Sep-13 22:32
memberbosfan25-Sep-13 22:32 
GeneralRe: CRegKey read from registry? Pin
Richard MacCutchan25-Sep-13 22:45
mvpRichard MacCutchan25-Sep-13 22:45 
GeneralRe: CRegKey read from registry? Pin
bosfan26-Sep-13 20:42
memberbosfan26-Sep-13 20:42 
GeneralRe: CRegKey read from registry? Pin
Richard MacCutchan26-Sep-13 21:30
mvpRichard MacCutchan26-Sep-13 21:30 
QuestionSocket Communication - Server with 2 different clients Pin
manoharbalu25-Sep-13 0:47
membermanoharbalu25-Sep-13 0:47 
AnswerRe: Socket Communication - Server with 2 different clients Pin
Richard MacCutchan25-Sep-13 1:01
mvpRichard MacCutchan25-Sep-13 1:01 
GeneralRe: Socket Communication - Server with 2 different clients Pin
manoharbalu25-Sep-13 2:24
membermanoharbalu25-Sep-13 2:24 
First of all, I apologize for the inconvenience regarding my font usage and I assure that I won't continue that henceforth.

I want to add something to my above question.

1. The Server and client_1 are already developed applications which communicate flawlessly.
2. There may be a multiple client instances of client_1 that may run and get connected to the server and exchange data. So if any of the data changes in the server, the same gets reflected in all of the client instances of client_1.
3. Now I want to add on a new client_2 entirely different from client_1. So any number of client_2 instances may run and connect to the same server to exchange some other set of data.
4. The Server is listening in Port 1500 for eg. Suppose it gets a client request, now how am I from the server side going to recognize the client before calling accept() so that I could route the client accordingly to exchange data.
For Eg: If I know that it is from client_1 I will call SendDataClient1() in a thread. or I will call SendDataClient2() if I know that it is from client_2
Please suggest me with some code to find out a way to differentiate the client_1 and client_2 for the server
GeneralRe: Socket Communication - Server with 2 different clients Pin
Richard MacCutchan25-Sep-13 2:59
mvpRichard MacCutchan25-Sep-13 2:59 
GeneralRe: Socket Communication - Server with 2 different clients Pin
manoharbalu25-Sep-13 19:12
membermanoharbalu25-Sep-13 19:12 
GeneralRe: Socket Communication - Server with 2 different clients Pin
Richard MacCutchan25-Sep-13 21:28
mvpRichard MacCutchan25-Sep-13 21:28 
GeneralRe: Socket Communication - Server with 2 different clients Pin
manoharbalu25-Sep-13 22:11
membermanoharbalu25-Sep-13 22:11 
GeneralRe: Socket Communication - Server with 2 different clients Pin
Richard MacCutchan25-Sep-13 22:21
mvpRichard MacCutchan25-Sep-13 22:21 
GeneralRe: Socket Communication - Server with 2 different clients Pin
manoharbalu26-Sep-13 3:36
membermanoharbalu26-Sep-13 3:36 
GeneralRe: Socket Communication - Server with 2 different clients Pin
Richard MacCutchan26-Sep-13 4:20
mvpRichard MacCutchan26-Sep-13 4:20 
GeneralRe: Socket Communication - Server with 2 different clients Pin
koll060425-Sep-13 16:17
memberkoll060425-Sep-13 16:17 
AnswerRe: Socket Communication - Server with 2 different clients Pin
Richard MacCutchan25-Sep-13 21:17
mvpRichard MacCutchan25-Sep-13 21:17 
AnswerRe: Socket Communication - Server with 2 different clients Pin
Malli_S25-Sep-13 2:24
memberMalli_S25-Sep-13 2:24 
QuestionClarification regarding the function CAsyncSocket::GetPeerName() Pin
manoharbalu25-Sep-13 0:14
membermanoharbalu25-Sep-13 0:14 
AnswerRe: Clarification regarding the function CAsyncSocket::GetPeerName() Pin
Richard MacCutchan25-Sep-13 0:22
mvpRichard MacCutchan25-Sep-13 0:22 
GeneralRe: Clarification regarding the function CAsyncSocket::GetPeerName() Pin
manoharbalu25-Sep-13 0:48
membermanoharbalu25-Sep-13 0:48 
Questionset the version Pin
koll060424-Sep-13 23:29
memberkoll060424-Sep-13 23:29 
AnswerRe: set the version Pin
Richard MacCutchan25-Sep-13 0:23
mvpRichard MacCutchan25-Sep-13 0:23 
GeneralRe: set the version Pin
koll060425-Sep-13 0:46
memberkoll060425-Sep-13 0:46 
GeneralRe: set the version Pin
koll060425-Sep-13 0:51
memberkoll060425-Sep-13 0:51 
QuestionRe: set the version Pin
Maximilien25-Sep-13 8:03
memberMaximilien25-Sep-13 8:03 
AnswerRe: set the version Pin
koll060425-Sep-13 16:06
memberkoll060425-Sep-13 16:06 
Questiondoes listivew_???? make handles leak...? [modified] Pin
JoneLe8624-Sep-13 19:10
memberJoneLe8624-Sep-13 19:10 
QuestionMFC PreTranslateMessage walks opposite the documentation. Pin
Vaclav_Sal24-Sep-13 9:04
memberVaclav_Sal24-Sep-13 9:04 
AnswerRe: MFC PreTranslateMessage walks opposite the documentation. Pin
Randor 24-Sep-13 11:03
professional Randor 24-Sep-13 11:03 
QuestionHow to get Ip Address and Port No MFC Sockets Pin
manoharbalu24-Sep-13 3:26
membermanoharbalu24-Sep-13 3:26 
AnswerRe: How to get Ip Address and Port No MFC Sockets Pin
jeron124-Sep-13 3:40
memberjeron124-Sep-13 3:40 
QuestionCheck Driver Pin
john563224-Sep-13 1:25
memberjohn563224-Sep-13 1:25 
QuestionRe: Check Driver Pin
DavidCrow24-Sep-13 3:21
memberDavidCrow24-Sep-13 3:21 
AnswerRe: Check Driver Pin
jeron124-Sep-13 3:29
memberjeron124-Sep-13 3:29 
AnswerRe: Check Driver Pin
Erudite_Eric24-Sep-13 8:43
memberErudite_Eric24-Sep-13 8:43 
AnswerRe: Check Driver Pin
Gisle Vanem25-Sep-13 0:24
memberGisle Vanem25-Sep-13 0:24 
Questionwhen its required explicit keyword in constructor Pin
ranjithkumar8124-Sep-13 1:00
memberranjithkumar8124-Sep-13 1:00 
AnswerRe: when its required explicit keyword in constructor Pin
André Kraak24-Sep-13 2:16
memberAndré Kraak24-Sep-13 2:16 
QuestionConvert raw image data to PNG Pin
Don Guy23-Sep-13 12:39
memberDon Guy23-Sep-13 12:39 
AnswerRe: Convert raw image data to PNG Pin
Garth J Lancaster23-Sep-13 13:03
memberGarth J Lancaster23-Sep-13 13:03 
AnswerRe: Convert raw image data to PNG Pin
Randor 23-Sep-13 15:00
professional Randor 23-Sep-13 15:00 
GeneralRe: Convert raw image data to PNG Pin
Don Guy23-Sep-13 15:19
memberDon Guy23-Sep-13 15:19 
GeneralRe: Convert raw image data to PNG Pin
Randor 23-Sep-13 18:07
professional Randor 23-Sep-13 18:07 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 2 Jun 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid