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

List:       kde-core-devel
Subject:    Socket and general I/O proposed modifications
From:       Thiago Macieira <thiagom () wanadoo ! fr>
Date:       2001-12-15 11:29:53
[Download RAW message or body]

I am ready to make these two suggestions to KDE, which are BIC:

- remove the deprecated functions in KSocket, especially 
KSocket::initSockaddr. This WILL break a lot of things if they are not 
converted, including, for instance, the audiocd plugin (it uses that to 
access the CDDB server)

- all low-level I/O be done via classes, never directly. Sockets should 
always use KSocket/KServerSocket/KExtendedSocket, while file I/O should 
be done via QFile and so on. QIODevice is a common base-class for QFile, 
  KExtendedSocket, QSocket (which I don't recommend using), etc.

The latter one is to prevent problems that could arise, given that a 
socket could be connected via a proxy, which would, in turn, require 
special read/write functions to be called. If the code just uses 
::write(), behaviour could be unpredictable.

And, of course, if you just connect directly, what's the point in having 
a globally-configured proxy? It won't get used. That is inconsistent.

I am also ready to implement a BIC change to the return codes for 
KExtendedSocket::lookup, but I just can't do it now. I am still unable 
to code for KDE, being still locked in in Windows.

-- 
   Thiago Macieira - UFOT Registry number: 1001
  thiagom@mail.com
    ICQ UIN: 1967141  PGP: 0x8F2978D5 and 0xEA9037A5 (PGP 2.x)
      Registered Linux user #65028

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

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