🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4514

Re: stThreadBlocking Vs stNonBlocking confusion

#4514
From: Stefano Bonifazi
Date: Wed, 02 Feb 2005 10:21
40 lines
2616 bytes
Thanks for Your infinite patience Mr Lebeau!

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> ha scritto nel messaggio 
news:41ffd045$1@newsgroups.borland.com...
>
> Well, there is a caveat to the OnWrite events - if you make a blocking 
> call
> on a non-blocking socket,

Which for instance?

>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.

May I use Application->ProcessMessages() instead?

>> 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).

My server has to support many clients (not more than a hundred though!), and 
it's application have only to store what it receive or at least re-send that

>> 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.
>
As You said in the other message that thread code only have to receive / 
send the data, so it does not matter if it has to wait ... the program main 
thread is free to do whatever meanwhile!:)

Thanks Gambit!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Technical Details
Message-ID: <4200a98d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41fe906e@newsgroups.borland.com> <41fe99bf$1@newsgroups.borland.com> <41ff64b9@newsgroups.borland.com> <41ffd045$1@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: "Stefano Bonifazi" <stefboombastic@email.it>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <41fe906e@newsgroups.borland.com> <41fe99bf$1@newsgroups.borland.com> <41ff64b9@newsgroups.borland.com> <41ffd045$1@newsgroups.borland.com>
Subject: Re: stThreadBlocking Vs stNonBlocking confusion
Date: Wed, 2 Feb 2005 11:21:03 +0100
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 212.141.203.34
Message-ID: <4200a98d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107339661 212.141.203.34 (2 Feb 2005 02:21:01 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail