Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Feb : Re: Indy 10 TIdIRC component problems.
| Subject: | Re: Indy 10 TIdIRC component problems. |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 8 Feb 2008 13:18:34 |
"Unspoken" <ff_aa_cc_ee_tt@wp.pl> wrote in message
news:47aca797$1@newsgroups.borland.com...
> If it tells you something, here is the code responsible for this
Thank you, but I already know exactly why it is happening. It is actually
by design in general, but that design is not conformant to the IRC protocol
and needs to be augmented so TIdIRC can override it.
> I know that I should but I don't ;-). I don't know why. I've tested
> it a number of times and the PING is not readed when I am using
> TIdIrc.OnRaw.
Are you sure the server is sending a PING to begin with? Can you verify
that with a packet sniffer? There is nothing in TIdIRC or
TIdCommandHandlers to prevent PING from reaching the OnRaw event handler if
it is indeed being sent.
> However I am having other serious problem. My application hangs
> when I try to imediately show a newly created channel tab in OnJoin
> event.
Your code is not thread-safe. All inbound commands are received and
processed in the context of a worker thread that TIdIRC runs internally.
You can't directly access the UI safely from that thread (or any thread, for
that matter). You will have to synchronize with the main thread, such as
via the TIdSync or TIdNotify class, in order to update your UI correctly.
Gambit