[web-devel] simple-sendfile v0.2.4
Kazu Yamamoto ( 山本和彦 )
kazu at iij.ad.jp
Mon Jun 25 03:58:29 CEST 2012
> How do you handle timeouts? If you use sendfile to send a large file
> (such as a video download) and it takes longer than the warp timeout
> period (30 seconds or something), won't warp kill the connection
> thinking that the connection has hung and no progress is being made?
> Or am I missing something?
Haskell network library opens a socket with the non-blocking flag
set. So, the sendfile syscall returns if there is not enough write
buffer. The sendfile function in simple-sendfile takes an IO function
which is called when the sendfile syscall returns. Warp resets
timeout via the IO function.
More information about the web-devel