RE: ghc-4.08 -package net, for UDP ?

2000-07-21 Thread Simon Marlow

Marcus Shawcroft writes:

 I have a query about the `net' package implementation provided with
 hslibs in ghc-4.08.
 
 I have built some client server code which uses the UDP protocol.
 
 The primitives SocketPrim.sendTo and SocketPrim.recvFrom explicitly
 check the state of the socket and raise an exception if not connected
 (or listening) before invoking libc sendto and recvfrom.
 
 This would seem to me to be appropriate for stream orientated
 communication however for datagram communication the socket states
 `connected' and `listening' are not meaningful.
 
 To get my UDP code to work I had to modify SocketPrim.sendTo and
 SocketPrim.recvFrom to remove these socket state checks. In the
 situation that these primitives are invoked on an 
 un-connected TCP style
 socket, the underlying libc functions return error codes which are
 handled appropriately by SocketPrim.
 
 
 Can someone out there clarify:
   1) Did I miss something here, is there a more appropriate way of
 getting access to UDP.
   2) Is there a reason why  the socket state checks are made in
 SocketPrim instead of relying on the   underlying libc error  codes?

I think you're absolutely right.  I'll commit a fix.

Cheers,
Simon




Re: ANNOUNCEMENT: hMPI [HaskellMPI] 0.9.0 available

2000-07-21 Thread Michael Weber

On Thu, Jul 20, 2000 at 21:08:21 -0400, Benjamin Leon Russell wrote:
 Do you have any plans on making a Windows 9x/NT/2000-compatible
 version anytime soon?

Well, unfortunately, I don't have access to a Windoze box with a GHC
installed[1], so I just had no chance of testing it. Therefore, I
didn't advertise it as being Windows compatible. However, in theory,
it _should_ work, since hMPI doesn't use anything *nix-special, IMO.

If you do have the resources, it would be very kind, if you could test
it on Windows and give me some feedback about the results. If there
are changes necessary to make it Windows compatible, I'll try my best
to incorporate them.

[1] we've got Linux/{i386,alpha}, Solaris/SPARC, xBSD, etc. but
Windows only on the secretary's computer, and they'll beat me up,
if I dare to install GHC on it and develop software there ;-)


Cheers,
Michael
-- 
() ASCII ribbon campaign |  Chair for Computer Science  II  | GPG: F65C68CD
/\ against HTML mail |   RWTH Aachen, Germany   | PGP: 1D0DD0B9
   Never promise to complete any project within six months of the end of
  the year -- in either direction.