Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: configure local area connection properties programatically Pin
Randor 18-Dec-08 6:58
professional Randor 18-Dec-08 6:58 
AnswerRe: configure local area connection properties programatically Pin
Stuart Dootson18-Dec-08 10:42
professionalStuart Dootson18-Dec-08 10:42 
QuestionMFC CSocket and thread: architecture and performance Pin
popacio18-Dec-08 5:43
popacio18-Dec-08 5:43 
AnswerRe: MFC CSocket and thread: architecture and performance Pin
Mark Salsbery18-Dec-08 6:02
Mark Salsbery18-Dec-08 6:02 
GeneralRe: MFC CSocket and thread: architecture and performance Pin
Eytukan18-Dec-08 6:59
Eytukan18-Dec-08 6:59 
GeneralRe: MFC CSocket and thread: architecture and performance Pin
Mark Salsbery18-Dec-08 7:02
Mark Salsbery18-Dec-08 7:02 
GeneralRe: MFC CSocket and thread: architecture and performance Pin
popacio18-Dec-08 19:59
popacio18-Dec-08 19:59 
AnswerRe: MFC CSocket and thread: architecture and performance Pin
Randor 18-Dec-08 6:20
professional Randor 18-Dec-08 6:20 
popacio wrote:
I am not sure that this is a good archietecture because with 300 connections my application has become slow.
May be that if i create a separate thread for every connection performance improves ?


I would not recommend creating 300 threads. Your probably not going to gain anything by doing this, context switching will be very high along with increased memory usage. Your bottleneck is using 300 instances of the high level CSocket Class[^]. You would have a tremendous performance gain by using Overlapped I/O and an event based model using i/o completion ports[^]. This would also increase your scalability, in the future your employer may ask you to increase the data logging capability to double the network nodes.

Here is a fairly good read over at MSDN regarding I/O Completion Ports.[^]

Len Holgate has released a free version of his IOCP based, socket server framework[^] if your interested.

There is also the Boost.Asio library by Christopher Kohlhoff[^]. I have used both libraries, they seem to have similar performance although I did not comparatively benchmark them.

Best Wishes,
-David Delaune
GeneralRe: MFC CSocket and thread: architecture and performance Pin
popacio18-Dec-08 20:00
popacio18-Dec-08 20:00 
QuestionHow to tell when an application is being dragged around screen? Pin
KellyR18-Dec-08 5:33
KellyR18-Dec-08 5:33 
AnswerRe: How to tell when an application is being dragged around screen? Pin
Randor 18-Dec-08 5:47
professional Randor 18-Dec-08 5:47 
GeneralRe: How to tell when an application is being dragged around screen? Pin
KellyR18-Dec-08 7:09
KellyR18-Dec-08 7:09 
QuestionError when adding files to C++ Pin
Cozmo2318-Dec-08 4:54
Cozmo2318-Dec-08 4:54 
AnswerRe: Error when adding files to C++ Pin
Jijo.Raj18-Dec-08 4:58
Jijo.Raj18-Dec-08 4:58 
AnswerRe: Error when adding files to C++ Pin
Randor 18-Dec-08 5:09
professional Randor 18-Dec-08 5:09 
AnswerRe: Error when adding files to C++ Pin
timojk18-Oct-09 20:44
timojk18-Oct-09 20:44 
AnswerRe: Error when adding files to C++ Pin
STDF29-Jan-10 4:22
STDF29-Jan-10 4:22 
QuestionTree Control Icons/Image List? Pin
Software200718-Dec-08 3:29
Software200718-Dec-08 3:29 
AnswerRe: Tree Control Icons/Image List? Pin
Jonathan Davies18-Dec-08 4:09
Jonathan Davies18-Dec-08 4:09 
QuestionRadian angle to Quaternion Pin
shaibee18-Dec-08 3:28
shaibee18-Dec-08 3:28 
AnswerRe: Radian angle to Quaternion Pin
Cedric Moonen18-Dec-08 3:46
Cedric Moonen18-Dec-08 3:46 
GeneralRe: Radian angle to Quaternion Pin
shaibee18-Dec-08 3:53
shaibee18-Dec-08 3:53 
GeneralRe: Radian angle to Quaternion Pin
Randor 18-Dec-08 4:37
professional Randor 18-Dec-08 4:37 
AnswerRe: Radian angle to Quaternion Pin
El Corazon18-Dec-08 6:38
El Corazon18-Dec-08 6:38 
AnswerRe: Radian angle to Quaternion Pin
Stuart Dootson18-Dec-08 7:52
professionalStuart Dootson18-Dec-08 7:52 

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.