[Haskell-cafe] Parsec and network data
brianchina60221 at gmail.com
Tue Aug 26 18:52:57 EDT 2008
On Tue, Aug 26, 2008 at 3:43 PM, John Van Enk <vanenkj at gmail.com> wrote:
> Perhaps you'll want to continue with the hGetLine setup in one thread
> (assuming the NNTP data is line delimited), then in another, parse the data,
> then in a third, respond.
Sorry if my writing was unclear. I think hGetLine is really unsuited
for doing anything with data from a network. It's like the Haskell
equivalent of gets(3). I think it's only suitable for quick tests or
toy programs. The only way I can think to make it a little safer is to
wrap it in a timeout, and that'd still be really bad.
More information about the Haskell-Cafe