Re: [gtk-vnc-devel] disconnect signal



Em Ter, 2007-09-11 às 20:05 +0100, Daniel P. Berrange escreveu:
> 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.

OK, no problem, but:

> 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.

Indeed again, but, in this case, the 'disconnected' signal is useless in
my opinion.

I was about to ask for a 'auth error' signal, but this 'error' signal is
more generic and i think it solves my problems.

In this case, we should start i18n for gtk-vnc, in order to have the
error messages translated.

Also, it would be nice having a table of error code available in
vncdisplay.h, in case the application which receives the signal chooses
not to display an specific error.

Cheers,
-- 
Jonh Wendell
jonh wendell gmail com (MSN / Google Talk)

Linux User #114432
https://launchpad.net/~wendell





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