Article View: borland.public.cppbuilder.internet.socket
Article #4509Re: stThreadBlocking Vs stNonBlocking confusion
From: Remy Lebeau (TeamB)
Date: Tue, 01 Feb 2005 18:56
Date: Tue, 01 Feb 2005 18:56
38 lines
2439 bytes
2439 bytes
"Stefano Bonifazi" <stefboombastic@email.it> wrote in message news:41ff64b9@newsgroups.borland.com... > Great!! Thanks!! Now finally I understand what that event is needed for!:) Well, there is a caveat to the OnWrite events - if you make a blocking call on a non-blocking socket, the call will fail with a WSAEWOULDBLOCK error code, and you have to wait until the OnWrite event is triggered before you can send more data to the socket again. > My needs are that the server can send or receive those big files > at the same time without one client sitting while waiting for others! That is not what I meant. I was referring to the requirements of the server (how many clients it should service, what kind of application you are using the code in, etc). > Sorry but I still don't understand :( What do You mean with calling code? The code that is calling SendBuf(), ReceiveBuf(), etc. In other words, the code that is sending/reading the data to/from the socket. > that is the OnClientRead is triggered once the socket has finished > to receive, Do I mistake? OnClientRead is triggered when data has arrived on the socket but has not been read by the application yet.. > I always thought that one of the most important features of BCB > vs VC was the clearness due to the events handlers ... Setting up event handlers in general is clean. Actually using events to control your processing can break up your code logic and make it difficult to manage and/or debug. Gambit
Technical Details
Message-ID:
<41ffd045$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41fe906e@newsgroups.borland.com> <41fe99bf$1@newsgroups.borland.com> <41ff64b9@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,4f7607071b9a8537 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41fe906e@newsgroups.borland.com> <41fe99bf$1@newsgroups.borland.com> <41ff64b9@newsgroups.borland.com> Subject: Re: stThreadBlocking Vs stNonBlocking confusion Date: Tue, 1 Feb 2005 10:56:59 -0800 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <41ffd045$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1107284037 68.69.17.41 (1 Feb 2005 10:53:57 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail