Sockets on Windows

Matthew Richards
Fri, 23 Feb 2001 12:19:41 -0000

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,

-----Original Message-----
[]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

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