In local.glasgow-haskell-users, you wrote: > suppose i want to write a stupid ftp client, i want to connect to the ftp > server, wait for it to give it's intro stuff (welcome to blah, > username: ) and then it wants input. how do i do something like this? > >> connect cfg = withSocketsDo $ >> do h <- connectTo (remoteAddr cfg) (Service (remoteType cfg)) >> hWaitForInput h 1000 >> s <- readWhileAvailable h >> return s
Why don't you use hGetLine? FTP is line based, so you just have to loop until there's no dash in the response. -- Wonderful \hbox (0.80312pt too nice) in paragraph at lines 16--18 Volker Stolz * [EMAIL PROTECTED] Please use PGP or S/MIME for correspondence! _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
