[Haskell-beginners] Re: Strange errors in network
Maciej Piechotka
uzytkownik2 at gmail.com
Mon Jun 15 06:21:24 EDT 2009
On Sat, 2009-06-13 at 02:01 +0200, Maciej Piechotka wrote:
> I have problems with my nntp library (http://code.haskell.org/nntp/). If
> I try to list command it seems to fail.
>
> Test code:
> > (c,p) <- connectToHost "news.example.com" Nothing
> > forGroups c (System.IO.putStrLn . groupName)
> *** Exception: <socket: 6>: Data.ByteString.hGetLine: end of file
>
> Conncection by telnet (according to wireshark):
> -> SYN
> <- SYN, ACK
> -> ACK
> <- NNTP Helo Message
> -> ACK
>
> Connection by Haskell:
> -> SYN
> <- SYN ACK
> -> ACK
> <- NNTP Helo Message
> -> ACK
> <- FIN ACK (after 10 s)
> -> ACK
>
> If I try to run by hand the commands in ghci I get mixed results
> (sometimes works sometimes it fails).
Apparently I needed to flush the stream despite having line buffering.
Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/beginners/attachments/20090615/7548a700/attachment.bin
More information about the Beginners
mailing list