
26 Jun
2004
26 Jun
'04
12:40 a.m.
Hi, the Network module provides the data type SocketOption. I am particularly interested in setting the RecvTimeOut and SendTimeOut values, but I wonder how to set them. The function setSocketOption :: Socket -> SocketOption -> Int -> IO () allows me only 'Int' parameters, but the kernel expects a struct timeval here -- or more accurately, a pointer to one. Do I really have to engage in FFI pointer wizardry here, or is there a simpler way to set these values? Am I even supposed to set them, or is there a better way to specify general I/O timeouts than on the socket level? Peter