Interp: set sockets unbuffered by default

This commit is contained in:
darkf 2013-11-22 01:09:55 -08:00
parent f32b05c22b
commit 014567f61b
1 changed files with 1 additions and 0 deletions

View File

@ -157,6 +157,7 @@ _sockopen (TupleV [StrV host, IntV port]) = do
sock <- SO.socket (SO.addrFamily addr) SO.Stream SO.defaultProtocol
SO.connect sock (SO.addrAddress addr)
handle <- SO.socketToHandle sock ReadWriteMode
hSetBuffering handle NoBuffering
return handle
put (handles ++ [handle], env)
return . StreamV $ length handles