[gnet] GOIO Hacking, forking GNet code



Hi!

In short: I'm contemplating over forking parts of GNet, to achieve a
more coherent, GObject-based IO framework.

Now the whole story: I did a bit of hacking on GOIO (see [0] and [1]):

* I added a GoioWatchable interface, which returns a
  GMainLoop-compatible GSource*.  

* I implemented (or rather stole from GNet ;)) an GoioAsync object
  that sits upon another GoioObject and provides asynchronous,
  buffered, read/write access ala GConn.

  Additionally, you can also read/write it synchronously. This was the
  itch that got me started hacking on this - there is no way to
  "cleanly" read directly from the GIOChannel of a GConn, since some
  data may be in its read buffer (and thus invisible to the
  GIOChannel).

* Added GoioMemFile object that allows access to a GString as if it
  were a file (perhaps I should base it on GByteBuffer instead).

GOIO equipped with my hacks can be found on [2].

Now, to make my application [3], which uses GConn heavily, work with GOIO,
I'd like to have an equivalent of GTcpConnection inside
GOIO. Unfortunatly, to achieve this, I'd have to fork a lot of code
from GNet. 

So, I want to hear opinions from the GNet developers how they relate
to such an action. From my side, I think there has to be a solution to
the code duplication issue in the long run. 

GOIO will be more flexible enough that it should be principially be
possible to make the GNet API a wrapper around GOIO and optionally
ship the GNet API along with GOIO or vice versa. Of course, this is
not something that would happen tomorrow, but I'd like to hear what
the GNet people think about it.

[0] http://bugzilla.gnome.org/show_bug.cgi?id=106686
[1] http://mail.gnome.org/archives/gtk-devel-list/2004-May/msg00026.html
[2] http://stud3.tuwien.ac.at/~e9926584/src/
[3] http://www.nongnu.org/distwork/Home.html

Kind Regards, Andy
-- 
Andreas Rottmann         | Rotty ICQ      | 118634484 ICQ | a rottmann gmx at
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!



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