[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    Re: [Kopete-devel] [Bug 63457] SSL support for IRC
From:       Jason Keirstead <jason () keirstead ! org>
Date:       2004-02-05 20:31:45
Message-ID: 200402051631.45757.jason () keirstead ! org
[Download RAW message or body]

On February 05, 2004 4:09 pm, Michel Hermier wrote:
> Can you move/remove the messageboxes from the SSL class and put it in the
> kopete protocol code. 2 reasons for this:
> - libkirc is a raw protocol lib so don't integrate UI stuff inside.

This isn't really a valid argument; half of KIO has dialogs built in and they 
are all protocols.

I would be heavily against this, due to the fact that I wanted to abstract as 
much as possible the notion of an SSL vs. non SSL connection not only from 
Kopete itself, but libkirc. Right now the SSL code is totally contained in 
ksslsocket.cpp, which inherits from KExtSocket,  To libkirc there is no 
difference at all between SSL and non SSL except creating the class.

> - modal(only?) message boxes is(still?) creating potential crash in kopete
> due to it's design.

The dialogs being modal is an issue *currently*, but it won't be once we have 
KopeteGlobal::UI::mainWidget() ( after this weekend Martijn?? :P ).

I do realize that there is the idea of eventually having GUI and non-GUI 
abstraction but that is so far away right now in Kopete alone, let alone IRC, 
that I would rather have the socket abstraction then nothing.

Eventually, this GUI code hopefully will be put into KIO somewhere so it won't 
be in libkirc anyways.

> Why using threads for the SSL decoding? is the SSL decoding so slow?

Because the KExtSocket API is retarded, to put it bluntly.

KExtSocket uses its own QSocketNotifier to know when the socket has data. The 
slot this notifier is connected to *SHOULD* be a virtual, so that inheriting 
classes can override it to do something different when there is data (like, 
read the data from KSSL instead of off the raw socket ).

But it is not a virtual.... so you can't use this notifier for anything. 
KExtSocket just *always* reads the data off the raw socket or it's buffer. 
So, I am polling KSSL  for data in a separate thread.

I realized today that instead of having this thread I could just create my own 
QSocketNotifier for the socket and just totally ignore the KExtSocket events. 
I may do that instead. I will experiment tonight, I may be able to get rid of 
that thread.

-- 
There's no place like 127.0.0.1

http://www.keirstead.org
_______________________________________________
Kopete-devel mailing list
Kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic