Article View: borland.public.cppbuilder.internet.socket
Article #3393Re: Simple e-mail server
From: Vladimir Stefanovic
Date: Tue, 27 Sep 2005 18:14
Date: Tue, 27 Sep 2005 18:14
36 lines
1948 bytes
1948 bytes
> If the listening thread is terminated, the TServerSocket
> is still "open". Closing and re-opening the TServerSocket
> is the only way to restart the listening thread.
This explanes one of my earlier 'problems'.
>> Crach of the TServerSocket because of some reason
>> is OK, but I want it to restart as soon as possible by
>> TServiceApplication.
>
> In this particular situation, there is no way to be notified
> when the listening thread has crashed. You have no access
> to it at all.The only way to know if the server is no longer
> listening is to actually connect another client to the server
>and see if it fails.
But can I have a TTimer which periodically checks:
if ( !ServerSocket1->Active )
{
// ...
}
... or place that code in TServiceApplication::OnExecute()
while ( !Terminated )
{
// ...
}
?
--
Best regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<43398ba5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4337dfe1$1@newsgroups.borland.com> <4338297e@newsgroups.borland.com> <433839f8@newsgroups.borland.com> <43386dd2$1@newsgroups.borland.com> <4339666a@newsgroups.borland.com> <43397d3c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,97b4b095375844bd X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Newsgroups: borland.public.cppbuilder.internet.socket References: <4337dfe1$1@newsgroups.borland.com> <4338297e@newsgroups.borland.com> <433839f8@newsgroups.borland.com> <43386dd2$1@newsgroups.borland.com> <4339666a@newsgroups.borland.com> <43397d3c$1@newsgroups.borland.com> Subject: Re: Simple e-mail server Date: Tue, 27 Sep 2005 20:14:43 +0200 Lines: 38 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: 82.117.212.65 Message-ID: <43398ba5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1127844773 82.117.212.65 (27 Sep 2005 11:12:53 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail