Re: Data available for reading in a GIOChannel

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

 



Callbacks on a GIOChannel (as described) are re-entrant!.  I know since i have hit this problem.  Essentially you must read what you can.  If its a socket you would have soimething like

                           bytes_read = recv( fd, ( void * ) ( &buffer[ current_byte ] ), expected_size );
                           current_byte += bytes_received;

and then you would exit the function.  If current_byte hasn't reached the expected_size, then you just gotta wait till you
get called back again.  But under no circunstance should you loop in this function.  You will not get what you want if you do that.

travis miller
raphtee@xxxxxxxxx


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux