thomas.dubuisson at gmail.com
Sat Jan 31 16:32:12 EST 2009
The network library is no more than an FFI library to a Berkeley
socket interface and as such it implicitly expects you to know sockets
already (eg. from programming in C). One advantage here is reading
man pages actually helps (unlike with most Haskell coding) and you can
also make equivalent C programs to test things out.
In the long term we should design and build a more functional network library.
On Sat, Jan 31, 2009 at 9:19 PM, Stephan Friedrichs
<deduktionstheorem at web.de> wrote:
> Andrew Coppin wrote:
>> I'm trying to write a simple program that involves UDP. I was hoping
>> something like this would work:
> How about using bindSocket? At least that's the main difference between
> your code snippet and our (UDP-using) barracuda project :)
>> main2 = do
>> s <- socket AF_INET Datagram defaultProtocol
> bindSocket s ...
>> putStrLn "Waiting..."
>> x <- recv s 100
>> putStrLn x
> Früher hieß es ja: Ich denke, also bin ich.
> Heute weiß man: Es geht auch so.
> - Dieter Nuhr
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe