
19 Jul
2010
19 Jul
'10
12:20 p.m.
On Mon, Jul 19, 2010 at 11:18:28AM -0400, David McBride wrote:
Okay, I figured this out on my own. This isn't as elegant but it definitely works:
By the way, your code can be simplified using forever; these ought to be equivalent:
fetchUDPSIP :: TChan a -> TChan B.ByteString -> IO () fetchUDPSIP commands chan = do sock <- getUDPSocket 5060 forever $ do result <- getUDP sock (atomically . writeTChan chan) result
fetchLine = forever $ do result <- Prelude.getLine Prelude.putStrLn result
-Brent