Click here to Skip to main content
15,888,100 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dialog based MFC multithreaded server Pin
Manmohan2917-Oct-09 9:12
Manmohan2917-Oct-09 9:12 
GeneralRe: dialog based MFC multithreaded server Pin
Manmohan2917-Oct-09 9:22
Manmohan2917-Oct-09 9:22 
GeneralRe: dialog based MFC multithreaded server Pin
Rajesh R Subramanian17-Oct-09 10:28
professionalRajesh R Subramanian17-Oct-09 10:28 
GeneralRe: dialog based MFC multithreaded server Pin
Moak17-Oct-09 11:12
Moak17-Oct-09 11:12 
NewsRe: dialog based MFC multithreaded server Pin
Manmohan2918-Oct-09 0:48
Manmohan2918-Oct-09 0:48 
GeneralRe: dialog based MFC multithreaded server Pin
Rajesh R Subramanian18-Oct-09 2:38
professionalRajesh R Subramanian18-Oct-09 2:38 
GeneralRe: dialog based MFC multithreaded server Pin
Manmohan2918-Oct-09 4:03
Manmohan2918-Oct-09 4:03 
GeneralRe: dialog based MFC multithreaded server Pin
Moak18-Oct-09 8:04
Moak18-Oct-09 8:04 
This isn't a simple example and the use of threads together with CAsyncSocket is unjustified and inefficient. Joseph M. Newcomer is a deeply respect member in developer circles, however I would say that the link you found was never intended as a MFC networking tutorial. Mixing asynchronous sockets and threads make little sense, here is an overview of basic server concepts:

a) blocking servers (handling only one request at a time, then wait again blocking)
b) threaded servers (handling simultaneous requests, one thread for every new socket, maybe from a pool).
c) asynchronous server (handling simultaneous requests, one thread context will handle all sockets)
d) variants such as IO completition ports

Instead of trying to convert one example code you had into a different thing, it would be easier if you learn about different networking concepts and start with simple examples. There are so many choices and CAsyncSocket might not be the best alternative in the long term (there are known problems). Perhaps have a look at some of the links I gave you. Smile | :)

/M


QuestionIs there any existing function to change language ID to language String? Pin
includeh1017-Oct-09 3:11
includeh1017-Oct-09 3:11 
AnswerRe: Is there any existing function to change language ID to language String? Pin
Michael Schubert17-Oct-09 5:22
Michael Schubert17-Oct-09 5:22 
QuestionC++ advanced literature pls? Pin
lawsmlt17-Oct-09 3:02
lawsmlt17-Oct-09 3:02 
Questionhow to undef a typedef? Pin
includeh1016-Oct-09 23:35
includeh1016-Oct-09 23:35 
AnswerRe: how to undef a typedef? Pin
Cedric Moonen16-Oct-09 23:50
Cedric Moonen16-Oct-09 23:50 
GeneralRe: how to undef a typedef? Pin
includeh1017-Oct-09 0:21
includeh1017-Oct-09 0:21 
GeneralRe: how to undef a typedef? Pin
Maximilien17-Oct-09 1:18
Maximilien17-Oct-09 1:18 
GeneralRe: how to undef a typedef? Pin
includeh1017-Oct-09 2:04
includeh1017-Oct-09 2:04 
GeneralRe: how to undef a typedef? Pin
Maximilien17-Oct-09 2:16
Maximilien17-Oct-09 2:16 
GeneralRe: how to undef a typedef? Pin
includeh1017-Oct-09 2:55
includeh1017-Oct-09 2:55 
GeneralRe: how to undef a typedef? Pin
Richard MacCutchan17-Oct-09 3:06
mveRichard MacCutchan17-Oct-09 3:06 
GeneralRe: how to undef a typedef? Pin
includeh1017-Oct-09 3:13
includeh1017-Oct-09 3:13 
GeneralRe: how to undef a typedef? Pin
Richard MacCutchan17-Oct-09 4:00
mveRichard MacCutchan17-Oct-09 4:00 
GeneralRe: how to undef a typedef? Pin
Tim Craig17-Oct-09 16:59
Tim Craig17-Oct-09 16:59 
GeneralRe: how to undef a typedef? Pin
David Crow17-Oct-09 17:05
David Crow17-Oct-09 17:05 
GeneralRe: how to undef a typedef? Pin
includeh1017-Oct-09 3:16
includeh1017-Oct-09 3:16 
GeneralRe: how to undef a typedef? Pin
Richard MacCutchan17-Oct-09 4:02
mveRichard MacCutchan17-Oct-09 4:02 

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.