Socket Options

Peter Simons simons at
Fri Jun 25 20:40:12 EDT 2004


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

  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?


More information about the Glasgow-haskell-users mailing list