🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1988

Re: help with Indy Telnet

#1988
From: Remy Lebeau (TeamB)
Date: Fri, 01 Sep 2006 16:46
33 lines
2693 bytes
"Andre' Burke" <no.spam@spam.no> wrote in message
news:44f7ef1a@newsgroups.borland.com...

> What I can't figure out is why the OnDataAvailable would
> deadlock, or for that matter the thread that is calling it.

I see that you have the TIdTelnet::ThreadedEvent property set to true.  That
makes the OnDataAvailable event handler code run in the context of the
reading thread, so you have to make sure that its code is thread-safe.  Is
your logger thread-safe?  What kind of container are you using for your
Incoming_Queue, and is it thread-safe?  I do notice that you are accessing a
couple of counter-related variables in the event handler without protection.

> When this happens, I dont even get this message in the log-file, so
> its not even getting into the code of the OnDataEvent.

Since you have the ThreadedEvent property set to true, then that is only
possible if the reading thread is not receiving any data, meaning that it is
blocked in an idle reading operation.  If actual data is received, then
there is no way the reading thread can become blocked before triggering the
OnDataAvailable event.

With that said, there is another possibility to consider - since you are
using a Telnet component, what does the actual transmitted data look like?
Although it is probably not the case in this situation, it is technically
possible that the data itself could be interpreted entirely as Telnet
control sequences with no application data available.  If that were to
happen, then there would be no reason for the OnDataAvailable to be
triggered.


Gambit
Technical Details
Message-ID: <44f86462$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!news-han1.dfn.de!news-stu1.dfn.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44f68cef@newsgroups.borland.com> <44f6917c$1@newsgroups.borland.com> <44f69c27@newsgroups.borland.com> <adsdf2dk8k4s0tefv5r49fi67ghjs6rlmt@4ax.com> <44f7d1ac$1@newsgroups.borland.com> <44f7e8a0$1@newsgroups.borland.com> <44f7ef1a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3d66693bd859a203
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: <44f68cef@newsgroups.borland.com> <44f6917c$1@newsgroups.borland.com> <44f69c27@newsgroups.borland.com> <adsdf2dk8k4s0tefv5r49fi67ghjs6rlmt@4ax.com> <44f7d1ac$1@newsgroups.borland.com> <44f7e8a0$1@newsgroups.borland.com> <44f7ef1a@newsgroups.borland.com>
Subject: Re: help with Indy Telnet
Date: Fri, 1 Sep 2006 09:46:52 -0700
Lines: 35
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: <44f86462$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1157129314 68.69.17.41 (1 Sep 2006 09:48:34 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!news-han1.dfn.de!news-stu1.dfn.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail