Article View: borland.public.cppbuilder.internet.socket
Article #5650TIdTCPServer (Indy) problems
From: Michele Santucci
Date: Wed, 30 Jun 2004 13:05
Date: Wed, 30 Jun 2004 13:05
30 lines
2071 bytes
2071 bytes
Hello ng, I'm writing a test server using the Indy TIdTCPServer and I have some problems: I need to write a server that's capable of accepting just one connection and then show the data got from the peer on a TListBox. I wrote all the code and it partially works but I still need some help on the connection / disconnection mechanism. My first doubt is about the OnExchange event .. is it triggered just when the server spawn for the first time the peer thread or each time something happens to the peer connection (read data, write data, disconnection)? Then.. what's the best way to handle safely peer's disconnections and server shutdowns? I tried in several ways but I always have errors of all kinds. Are there any samples to show how to use properly this component? I already read all the indy's samples given along with Borland C++ Builder 6 Pro but I haven't found anything useful ... (they are TOO simple: since most of connection are closed after the first data exchange). -- ================================ Michele Santucci Software Development Manager Celin Avio S.r.l. Via Fontevivo, 21/M 19100 La Spezia tel. +39-0187564080 ================================
Technical Details
Message-ID:
<40e2baf1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,598362c9168ae954,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Michele Santucci" <michele.santucci.nospam@nospam.celinavio.it> Newsgroups: borland.public.cppbuilder.internet.socket Subject: TIdTCPServer (Indy) problems Date: Wed, 30 Jun 2004 15:05:26 +0200 Lines: 32 Organization: Celin Avio S.r.l. 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: 62.94.122.178 Message-ID: <40e2baf1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088600817 62.94.122.178 (30 Jun 2004 06:06:57 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail