> Are there any examples of using threads for client sockets?

Do you mean at server side or at client side ?
I understand you mean at server side.

> Would this time reduce by using threads? I don't wait around for
> anything, so I don't think that there will be time for other threads to
> get in.

Multithreading is slower than single threading if your application is CPU
bound. If your application is I/O bound and doesn't make use of asynchronous
I/O (ICS use asynchronous I/O for network), then using multithreading allow
to do some CPU task in a thread while another thread is blocked waiting for
an I/O to complete.

So the question is: Is you application CPU or I/O bound ?


Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

----- Original Message ----- 
From: "Info 2004" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Wednesday, November 01, 2006 8:14 PM
Subject: [twsocket] Threads with TWSocket


> Hi,
>
> Are there any examples of using threads for client sockets?
>
> What are the pros and cons of using a thread for every client connection?
>
> My application currently accepts a connection, processes the data and
> closes the connection in about 0.1 seconds. So if 100 clients connect
> simultaneously, it would take 10 seconds to service all of them. In
> fact, I can have about 12 connections before the 10061 error kicks in,
> as I am using XP to test with. It will be run on a proper server though.
> (Anyone know if you can up the limit before the 10061 error kicks in on
XP?)
>
> Would this time reduce by using threads? I don't wait around for
> anything, so I don't think that there will be time for other threads to
> get in.
>
> Regards,
>
> Andy
> -- 
> ASA Micros Ltd.
> 141 Wardle Road,
> Wardle,
> Rochdale.
> OL12 9JA
> UK
>
> Tel: +44(0)1706 355057
> Company No. 4722262
> VAT No. 704044772
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to