Article View: borland.public.cppbuilder.nativeapi
Article #14788Re: BCB TCP IP component
From: Hans Galema
Date: Sun, 03 Aug 2003 08:35
Date: Sun, 03 Aug 2003 08:35
37 lines
2607 bytes
2607 bytes
Chris wrote:
> So I would have to re-write the OnRead event to handle each Socket being
> received from inside a TServerSocket seperately?
Of course you have to keep the data sent by different clients separated.
You can use the Socket->Data property to keep track.
> When a client abruptly disconnects, that would be fatal, but it will throw
> an exception.
It would not be fatal. There would just be an OnClientError() event,
where you can set ErrorCode to zero and than yuo could remove that
connection. The Socket parameter will also be in the ServerSocket
Connections[] array.
> I can use this exception to reset the message I was receiving
> and free the memory, my problem is... Where would I put the try{} catch()
> statement to catch this general exception, as no one line of code would
> cause it?
See above.
As far as I know you would not need a try-cach block to receive data.
> It can't be on the project source cpp file, although that would
> work, it has to be more localized, in the TCP data transfer class cpp file,
> for all instances of the class created from the class declared in the cpp
> file.
?????
For further questions conserning TServerSocket/TClientSocket
please post in
borland.public.cppbuilder.internet.socket
Hans.
Technical Details
Message-ID:
<3f2cc8eb$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f29cebd$1@newsgroups.borland.com> <3f29d94d@newsgroups.borland.com> <3f29dd02$1@newsgroups.borland.com> <3f2a3040$1@newsgroups.borland.com> <3f2b2934$1@newsgroups.borland.com> <3f2b67c8@newsgroups.borland.com> <3f2c9856$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,9e6acf8dd63da257 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-03 01:39:14 PST Date: Sun, 03 Aug 2003 10:35:00 +0200 From: Hans Galema <j.m.galema.dontusethis@maartens.nl> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: BCB TCP IP component References: <3f29cebd$1@newsgroups.borland.com> <3f29d94d@newsgroups.borland.com> <3f29dd02$1@newsgroups.borland.com> <3f2a3040$1@newsgroups.borland.com> <3f2b2934$1@newsgroups.borland.com> <3f2b67c8@newsgroups.borland.com> <3f2c9856$1@newsgroups.borland.com> In-Reply-To: <3f2c9856$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.108.11 Message-ID: <3f2cc8eb$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059899627 129.125.108.11 (3 Aug 2003 01:33:47 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail