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

List:       kde-devel
Subject:    Re: KSocket
From:       Neil Stevens <multivac () fcmail ! com>
Date:       2000-09-09 20:35:10
[Download RAW message or body]

On Sat, 09 Sep 2000, Andreas Beckermann wrote:
> Hi
>
> I'm currently rewriting KPoker to make (e.g.) network games possible.
> I had some problems and switched between KSocket and QSocket (which both
> were not the problem) and found a very ugly behaviour of KSocket:
> When you use
> KSocket::enableWrite(true)
> the signal writeEvent() will be emitted. But: that is 2,000 times a
> second! I don't know if the signal is really necessary but a program
> must not use more than 90% of my CPU (PII 300) when it does *nothing*
> but emitting useless signals.
>
> Could someone a) fix this or if this is necessary (I can't imagin
> though) b) put a warning to ksock.h?

Why is that ugly?  That is the appropriate behavior.  writeEvent() is 
supposed to trigger when the socket can accept a write.  With your typical 
network socket, a write is always possible, so writeEvent will always be 
happening.

> BTW: as QSocket is in QT-2.2 will KSocket be continued? Is there a
> reason against QSocket?

Well, I don't know if there's a reason against QSocket, but there's a 
reason in favor of keeping KSocket: it's still in use.  I don't care if it 
gets marked deprecated, but I think it should stay.

-- 
Neil Stevens
multivac@fcmail.com
neil@qualityassistant.com

keyserver search.keyserver.net
Fingerprint 86EA ECD4 F258 FB1B D88F 9136 4F49 90F8 CD3E 5C1C

 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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