Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Settings = Settings {
- settingsPort :: Int
- settingsHost :: HostPreference
- settingsOnException :: Maybe Request -> SomeException -> IO ()
- settingsOnExceptionResponse :: SomeException -> Response
- settingsOnOpen :: SockAddr -> IO Bool
- settingsOnClose :: SockAddr -> IO ()
- settingsTimeout :: Int
- settingsManager :: Maybe Manager
- settingsFdCacheDuration :: Int
- settingsBeforeMainLoop :: IO ()
- settingsFork :: ((forall a. IO a -> IO a) -> IO ()) -> IO ()
- settingsNoParsePath :: Bool
- settingsInstallShutdownHandler :: IO () -> IO ()
- settingsServerName :: ByteString
- settingsMaximumBodyFlush :: Maybe Int
- settingsProxyProtocol :: ProxyProtocol
- getOnOpen :: Settings -> SockAddr -> IO Bool
- getOnClose :: Settings -> SockAddr -> IO ()
- getOnException :: Settings -> Maybe Request -> SomeException -> IO ()
Documentation
Various Warp server settings. This is purposely kept as an abstract data
type so that new settings can be added without breaking backwards
compatibility. In order to create a Settings
value, use defaultSettings
and the various 'set' functions to modify individual fields. For example:
setTimeout 20 defaultSettings
Settings | |
|
getOnClose :: Settings -> SockAddr -> IO () Source
getOnException :: Settings -> Maybe Request -> SomeException -> IO () Source