On Wed, Feb 22, 2012 at 10:23 PM, Johan Tibell <johan.tib...@gmail.com> wrote: > But the network package doesn't try to let you work with raw file > descriptors elsewhere (e.g. send and recv.) I'm not saying that > functions on Fds aren't useful, they are, just that the network > package is the wrong place for them. I'd put them in the unix package.
Putting them in the unix package means they won't be available for Windows (where I needed them the most). >> I use Int64 for Microseconds, to avoid truncation when Int is 32 bits. >> 2^31-1 microseconds is only 35 minutes and 47.483647 seconds. >> Perhaps I should just use Int and Int64, and be sure to document what >> units are used. > > We should use whatever the underlying OS uses. If that's a 32-bit int, > using a 64-bit int on the Haskell side doesn't help us. The goal here > is to faithfully match the underlying APIs. For SO_RCVTIMEO and SO_SNDTIMEO, Windows and Unix use different representations. Windows uses DWORD (unsigned 32-bit) milliseconds, while Unix uses struct timeval, which has microsecond precision. -Joey _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe