Article View: borland.public.cppbuilder.internet.socket
Article #3556Re: Client / Server Socket....
From: Paul
Date: Tue, 30 Aug 2005 09:14
Date: Tue, 30 Aug 2005 09:14
41 lines
2991 bytes
2991 bytes
I think I'm getting to grips with these components now. I've focused on the non-blocking mode so far. One thing I had not realised, or taken on board, was that the client will get an exception if it opens the socket and the server isn't running, so the app has to retry at regular intervals. Also I found that you have to process the read event (Socket->ReceiveBuf) otherwise you don't get another event signaled. There is one question though at this moment in time. The OnWrite event, does that simply notify the application that it can start writing to the socket after connection? I thought it would notify after every write had completed? In my tests the test app trace only shows one OnWrite event (for both client and server). Paul. 2005-08-27 12:17:08:0396 : Listening.... 2005-08-27 12:17:27:0033 : Get Socket.... 2005-08-27 12:17:27:0033 : Connected 2005-08-27 12:17:27:0033 : Accept 2005-08-27 12:17:27:0033 : Write Event - Write Ready 2005-08-27 12:17:28:0425 : Send Buffer (NOTE: server sends packet every 10sec) 2005-08-27 12:17:38:0429 : Send Buffer 2005-08-27 12:17:48:0434 : Send Buffer 2005-08-27 12:17:58:0438 : Send Buffer 2005-08-27 12:18:08:0442 : Send Buffer 2005-08-27 12:18:18:0447 : Send Buffer 2005-08-27 12:18:28:0451 : Send Buffer 2005-08-27 12:18:38:0456 : Send Buffer 2005-08-27 12:18:48:0460 : Send Buffer 2005-08-27 12:18:58:0464 : Send Buffer 2005-08-27 12:19:01:0939 : Read Event - Data Ready (NOTE: client sending 64K byte array....) 2005-08-27 12:19:01:0939 : Read Event - Data Ready 2005-08-27 12:19:01:0939 : Read Event - Data Ready 2005-08-27 12:19:01:0939 : Read Event - Data Ready 2005-08-27 12:19:01:0949 : Read Event - Data Ready 2005-08-27 12:19:01:0949 : Read Event - Data Ready 2005-08-27 12:19:01:0949 : Read Event - Data Ready 2005-08-27 12:19:01:0949 : Read Event - Data Ready 2005-08-27 12:19:08:0469 : Send Buffer
Technical Details
Message-ID:
<431414c7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43058ac8$1@newsgroups.borland.com> <4306110f$1@newsgroups.borland.com> <4306da89@newsgroups.borland.com> <430a07da$1@newsgroups.borland.com> <430a2cfe$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c4f84c0147b64fb7 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Paul" <plmacca@clara.co.uk> Newsgroups: borland.public.cppbuilder.internet.socket References: <43058ac8$1@newsgroups.borland.com> <4306110f$1@newsgroups.borland.com> <4306da89@newsgroups.borland.com> <430a07da$1@newsgroups.borland.com> <430a2cfe$1@newsgroups.borland.com> Subject: Re: Client / Server Socket.... Date: Tue, 30 Aug 2005 09:14:12 -0000 Lines: 43 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; Response NNTP-Posting-Host: 81.129.157.217 Message-ID: <431414c7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1125389511 81.129.157.217 (30 Aug 2005 01:11:51 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail