Re: gnome-socket API proposal



Derek Simkowiak wrote:

> > If this will be put into glib, however, it should be thread safe and
> > should have a (sigh) win32 implementation, IMO.
> 
>         For the Win32 stuff, we could just write a wrapper around the
> WinSock API.  I've never used WinSock, so can anyone here comment as to
> the ease/difficulty of making such a port?

The strangest oddity of WinSock, from what I remember, is 
that you have to explicitly initialize and de-initialize
the networking stack.  Other than that, the basic functions
of reading and writing data (for client apps) is nearly
identical to the unix api.  I never made it as far as 
writing a server side application using WinSock, so I can't
really comment on how to set up an socket for accepting
connections, etc.  As I recall Win32 has a call like 
WaitForMultipleObjects() that is used instead of select().
The server side api may take a little bit of thought, but 
it should be possible to bend WinSock into a general api 
wrapper.  You may wish to take a look at existing multi-
platform networking libraries (e.g. the ACE library,
http://www.cs.wustl.edu/~schmidt/ACE.html), to see how they
handle the platform differences.

> --Derek
> 
> --
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.

-- 
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
|  __                         a.k.a. Eric B. Mitchell |
|  |_) .  _  _|      _|  _        ricdude@toad.net    |
|  | \ ( (_ (_| (_| (_| (/_    www.toad.net/~ricdude  |
| How's My Programming?   Call:  1 - 800 - DEV - NULL |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+



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