-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Type-safe, portable alternative to getSocketOption/setSocketOption -- -- The network package provides getSocketOption and setSocketOption -- functions. These work fine for socket options represented using the -- int type (namely, all boolean options, and a few quantity -- options). However, it doesn't work for, say, SO_LINGER, -- SO_RCVTIMEO, and SO_SNDTIMEO, as these use -- different, platform-specific representations. -- -- This package implements the getters and setters as separate functions. -- At the moment, it only provides socket options that are available for -- both Unix and Windows. @package network-socket-options @version 0.1 -- | Documentation is currently lacking. For now, see man 7 socket -- and man 7 tcp of the Linux man-pages, or look up setsockopt -- in MSDN. module Network.Socket.Options -- | This option is get-only. getAcceptConn :: HasSocket sock => sock -> IO Bool getBroadcast :: HasSocket sock => sock -> IO Bool getDebug :: HasSocket sock => sock -> IO Bool getDontRoute :: HasSocket sock => sock -> IO Bool -- | This option is get-only. getError :: HasSocket sock => sock -> IO Int getKeepAlive :: HasSocket sock => sock -> IO Bool getLinger :: HasSocket sock => sock -> IO (Maybe Seconds) getOOBInline :: HasSocket sock => sock -> IO Bool getRecvBuf :: HasSocket sock => sock -> IO Int getRecvTimeout :: HasSocket sock => sock -> IO Microseconds getReuseAddr :: HasSocket sock => sock -> IO Bool getSendBuf :: HasSocket sock => sock -> IO Int getSendTimeout :: HasSocket sock => sock -> IO Microseconds -- | This option is get-only. getType :: HasSocket sock => sock -> IO SocketType getTcpNoDelay :: HasSocket sock => sock -> IO Bool setBroadcast :: HasSocket sock => sock -> Bool -> IO () setDebug :: HasSocket sock => sock -> Bool -> IO () setDontRoute :: HasSocket sock => sock -> Bool -> IO () setKeepAlive :: HasSocket sock => sock -> Bool -> IO () -- | On Windows, the Seconds value is truncated to 16 bits. This -- means if a linger time of more than 65535 seconds (about 18.2 hours) -- is given, it will wrap around. setLinger :: HasSocket sock => sock -> Maybe Seconds -> IO () setOOBInline :: HasSocket sock => sock -> Bool -> IO () setRecvBuf :: HasSocket sock => sock -> Int -> IO () -- | Note the following about timeout values: -- --