[gnet] Re: GIOChannels, GNet, GOIO



On Wed, 2004-05-12 at 18:03 +0400, Mikhail Zabaluev wrote:
> Hello Andreas,
> 
> On Sat, May 08, 2004 at 04:22:21PM +0200, Andreas Rottmann wrote:
> >
> > I want to bring Bug#106686 [0] up to dicsussion again. I like the idea
> > of having an GObject-based IO system quite a lot and think it would be
> > a worthwhile attempt to unify GIOChannel, GOIO (see [0] and [1]) and
> > the GNet library. Since I need a more flexibility than offered by
> > GNet+GIOChannel, I'm willing to invest some effort to get this
> > started. I have the following in mind (as needed for my project):
> > 
> > 1) Add an aynchronous facility ala GIOChannel watches to GOIO
> > 2) Provide a callback-based GConn-like interface above that
> > 3) "Port" GTcpSocket to GOIO
> > 
> > For those interested, the problem I need to solve is: I have a GConn,
> > using gnet_conn_readn(). After a certain amount of reads, I want to
> > switch to "bare" asynchronous operation on the underlying IOChannel
> > (using watches). I need to do the watch stuff since I have a
> > multiplexer that operates on GIOChannels -- the problem I have is that
> > the GConn does separate buffering.
> > 
> > Also, this would solve the shortcoming of GNet that you can't use
> > GConn-callback style IO on e.g. UNIX domain sockets (GConn is
> > hardwired with a GTcpSocket), since the GConn-style interface provided
> > in 2) will be able to be stacked above every object that implements
> > GoioWatchable.
> > 
> > Thoughts?
> 
> Thank you for your input and your interest in general.
> I certainly had in mind adding sockets to GOIO.
> As for GIOChannel, I doubt it's worth unifying it with
> GOIO because it's too limited and suited for modest
> requirements (i.e. no GObject).
> 
> Async capabilities weren't at the top of my drawing board because I
> care mostly for pluggable polymorphic streams (as inspired by java.io
> and, in part, GStreamer). However, if they can be integrated without
> much hassle, fine.
> 
> I'll take a look into your code in a day or two.
> Please keep me in touch.

Not to be too much of a party-pooper, but I've also worked a fair amount
on a stream GObject. Slightly-out-of-date API docs are at
http://esco.mine.nu/docs/gnome/gio/

The main difference between this and Goio is the (new, undocumented ATM)
start/stop_read/write() methods. So far as GIOChannel interop, I'm of
the opinion that any stream object should eventually supersede
GIOChannel in GLib.

-- 
Peace,

    Jim Cape
    http://ignore-your.tv

    "We still name our military helicopter gunships after victims
     of genocide. Nobody bats an eyelash about that: Blackhawk.
     Apache. And Comanche. If the Luftwaffe named its military
     helicopters Jew and Gypsy, I suppose people would notice."
       -- Noam Chomsky, "Propaganda and the Public Mind"

Attachment: signature.asc
Description: This is a digitally signed message part



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