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

List:       kde-core-devel
Subject:    Re: new kioslave question
From:       Waldo Bastian <bastian () suse ! de>
Date:       2000-02-25 13:09:50
[Download RAW message or body]

On Fri, 25 Feb 2000, aleXXX wrote:
> Hi,
>
> this evening I want to start hacking an ioslave, so some questions:
>
> 1. what do OpenConnection() and closeConnection() do ?
> Probably they open and close the connection, but when is a connection
> opened and closed again ?

openConnection is called the first time your slave needs to access a 
given host. closeConnection is not called at all at the moment I 
believe. When your slave needs to connect to another site, 
openConnection is called again. This implies a 'closeConnection' but 
closeConnection is not called.

> If I access an FTP-server, is the connection opened when I list the
> first directory of the server and closed if I leave the server again
> ? Or is it opened if I download a bunch of files and closed if this
> is done ?

Only when the slave is reused for a connection to another host it gets 
closed at the moment. A timeout would be usefull here. (To be 
implemented)

> 2. what should a function do, which does not work for a special
> protocol ? error(UNSUPPORTED) ?

Something like:
 error(  ERR_UNSUPPORTED_ACTION, "mkdir" );

See slavebase.cpp. There are default implementations which already 
return this. So you probably don't have to care about functions which 
you don't support.

Cheers,
Waldo

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

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