[Mono-list] Intrinsicly Non-Portable?

Christian Ratliff cratliff@lily.org
Fri, 23 Nov 2001 19:02:32 -0500


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  Hmm. I am looking closely at io.c, and, unfortunately, it gives
rise to yet another question. Since io.c implements a virtual IO
layer, with read, write, seek, etc, should sockets do the same type
of thing? There are serious differences between BSD and Win32 sockets
even when using the compatibility interface (e.g. close vs
closesocket and read vs recv).

  Sorry for having to ask so many simplistic questions, but hopefully
I will be able to put this information to use! :)

Christian

+-----+
Christian Ratliff <cratliff@lily.org>
lily Development Group
"This is the very perfection of man, 
  to find out his own imperfections" -  St. Augustine



- -----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]
On Behalf Of Dick Porter
Sent: Friday, November 23, 2001 6:53 PM
To: mono-list@ximian.com
Subject: Re: [Mono-list] Intrinsicly Non-Portable?


On Fri, Nov 23, 2001 at 05:09:28PM -0500, Christian Ratliff wrote:
>  
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>   Wonderful!
> 
>   Is there any documentation on the structure of the io-layer? If I
>  wanted to chip in an implementation of WSAEVENT, where would I
> start  my reading?

Each type of handle is implemented in its own file, and defines its
own totally private structure that inherits from a common struct. 
semaphores.c looks like a reasonably straightforward one to crib
from. 

The hard part is waiting for multiple handles to become signalled. 
wait.c fires off subthreads for each type of handle to wait for, and
gathers in the responses for WaitForMultipleObjects.

Actually, socket IO might be handled easiest by just extending io.c
which currently handles console and file IO.  I havent written the
wait_multiple support for console IO yet (or file IO, but that's only
used for overlapped IO which also hasnt been implemented yet) but
thats a fairly simple use of poll(2).

- - Dick


_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBO/7jmLZBtyfwMNgGEQJvdwCgzpPSTIa+3kBrHXQTotbW07Lz4wQAnRLf
MES/I4FW5nGZHlPV+51nWPO+
=P2GR
-----END PGP SIGNATURE-----