Re: network wrapper

Hi, Roberto

> > There should be no reason to need an additional layer for doing network
> > transfer. TCP sockets are basically the same across every platform that
> > GNOME runs on.
> >
> True, but I think an additional layer may simplify the task.
> Some time ago, I wrote a possible implementation of this and was discussed
> on this list. After the discussion it wasn't included in gnome-libs
> because:
> - my implementation depends on gnome-dns which is currently deprecated and
>   should be rethought/rewritten (maybe with a single, per-user dns
>   resolver daemon)
> - it's low level stuff and maybe glib is a better place for it
> - I currently have no time to make it thread-safe and port it to Win32,
>   and I think that would be necessary for it to be included in glib
> If you are curious, see

1. If you want that in glib (which might in fact be a good idea, given that we
   already have a main loop), you should mail a proposal to gtk-devel-list.
2. You shouldn't rely on IP-Addresses to fit in 32 bit. We might have IP6
   sometime in the future, so you should probably use a flag, which protocol
   is used (that should be the standard AF_... thingy) and a pointer to the
   address data to at least be able to cope with that later.
3. (ansyncronus) DNS lookup involves either multithreading or a external
   program, both of which is unwanted in GLib. So provide a hook function,
   that does the DNS lookup (i.e. a function to be called for dns lookup by
   glib, that asyncronously calles GLib callback-function to inform glib of
   the address. If that hook is not set (i.e. == NULL), just use the
   syncrounous resolution.
4. The interface should at least be so generic to allow ORBit to use it.
   Don't care about that, however, I will. (Don't beat me, Elliot. ;-)
5. This is just my opinion on matters. You wont know about the other
   maintainers ideas, unless you ask ;-) (of course in gtk-devel-list)


Sebastian Wilhelmi                   |            här ovanför alla molnen           |      är himmlen så förunerligt blå   |

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