
31 Jan
2009
31 Jan
'09
4:19 p.m.
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
[...]
//Stephan -- Früher hieß es ja: Ich denke, also bin ich. Heute weiß man: Es geht auch so. - Dieter Nuhr