Article View: borland.public.cppbuilder.internet.socket
Article #2397Re: TServerSocket SendText Exception
From: Remy Lebeau (TeamB)
Date: Fri, 21 Apr 2006 19:36
Date: Fri, 21 Apr 2006 19:36
18 lines
1772 bytes
1772 bytes
"Eric Patterson" <eric.patterson@bepco.com> wrote in message
news:44491a72$1@newsgroups.borland.com...
> Server->WaitForClientWriteEvent = true;
> while( Server->WaitForClientWriteEvent )
> {
> Sleep(10);
> }
That will not work. Non-blocking sockets use window messages internally.
You must pump the message queue in order for those events to occur. Which
then complicates your code because now clients can connect/disconnect while
you are still looping through them, so your loop can become screwed up
because your code is currently not set up to handle that situation.
Gambit
Technical Details
Message-ID:
<444934c4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44439c71$1@newsgroups.borland.com> <4443ca2a$1@newsgroups.borland.com> <4447a6f6$1@newsgroups.borland.com> <4447b917$3@newsgroups.borland.com> <4447c0b0$1@newsgroups.borland.com> <44480aa5$1@newsgroups.borland.com> <44491a72$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fea0b13af0f4efa8 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: <44439c71$1@newsgroups.borland.com> <4443ca2a$1@newsgroups.borland.com> <4447a6f6$1@newsgroups.borland.com> <4447b917$3@newsgroups.borland.com> <4447c0b0$1@newsgroups.borland.com> <44480aa5$1@newsgroups.borland.com> <44491a72$1@newsgroups.borland.com> Subject: Re: TServerSocket SendText Exception Date: Fri, 21 Apr 2006 12:36:02 -0700 Lines: 20 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: <444934c4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1145648324 68.69.17.41 (21 Apr 2006 12:38:44 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail