You need to wrap up the use of sockets in a "withSocketsDo", as in:

> server port = withSocketsDo $
>               do socket <- listenOn port
>                       -- etc

I seem to recall the documentation says you always need to use that, so I
don't know why it works without on Linux :-)

Hope this helps,
Matthew


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Steinitz,
Dominic J
Sent: Friday, February 23, 2001 11:10 AM
To: glasgow-haskell-users
Subject: Sockets on Windows


I am was trying out sockets. These worked fine under linux. Under windows I
get the following error. Does anyone know what it means and how I can fix
it? I can telnet from within the cygwin window so I assume tcp/ip is
running.

Thanks, Dominic.

administrator@DEFAULT /cygdrive/d/dom/home/socketTest
$ ./server1 8000

Fail: does not exist
Action: getProtocolByName
Reason: no such protocol entry




----------------------------------------------------------------------------
---------------------
21st century air travel     http://www.britishairways.com


_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to