
21 Aug
2010
21 Aug
'10
2:35 p.m.
John Millikin
I think the docs are wrong, or perhaps we're misunderstanding them. Magnus is correct.
Attached is a test program which listens on two ports, 42000 (blocking IO) and 42001 (non-blocking). You can use netcat, telnet, etc, to send it data. The behavior is as Magnus describes: bytes from hGetNonBlocking are available immediately, while hGet waits for a full buffer (or EOF) before returning.
"hSetBuffering handle NoBuffering"?
The implementation as it is is fine IMO.
G
--
Gregory Collins