Re: [gtk-vnc-devel] disconnect signal



On Tue, Sep 11, 2007 at 03:55:13PM -0300, Jonh Wendell wrote:
> Hi, folks.
> 
> What do you think about change the way the 'disconnect' signal is
> emitted? I think it should be raised only if the connection is lost, or
> if the server closes the connection.
> 
> If i close the connection by myself, or if i close the whole program, i
> don't want to receive a 'you were disconnected' signal.
> 
> Was i clear? I don't know if what i have in mind should be implemented
> like i said or by adding another type of signal...

I intended the disconnect signal to be used to track the 'lifecycle' of
a connection and as such I think it should always be emitted, no matter
how the connection was closed.

One thing I do want to add though is a 'error' signal which would be emitted
whenever anything goes wrong in the client (ie anywhere the code which sets
the has_error flag to TRUE). In particular this signal would include some
kind of info about what failed - perhaps just the 'strerror(errno)' data or
a message generated by our own code for some semantic error eg "Unsupported
protocol version", or "Supported authentiction method", or 'Remote server
closed connection". Would a general 'error' signal solve the issue you want
to address ?  The 'error' signal would of course be immediately followed by
the 'disconnected' signal too. 

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]