-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A fast, light-weight web server for WAI applications. -- -- The premier WAI handler. For more information, see -- http://steve.vinoski.net/blog/2011/05/01/warp-a-haskell-web-server/. @package warp @version 1.3.2 -- | A fast, light-weight HTTP server handler for WAI. module Network.Wai.Handler.Warp -- | Run an Application on the given port. This calls -- runSettings with defaultSettings. run :: Port -> Application -> IO () -- | Run a Warp server with the given settings. runSettings :: Settings -> Application -> IO () -- | Same as runSettings, but uses a user-supplied socket instead of -- opening one. This allows the user to provide, for example, Unix named -- socket, which can be used when reverse HTTP proxying into your -- application. -- -- Note that the settingsPort will still be passed to -- Applications via the serverPort record. runSettingsSocket :: Settings -> Socket -> Application -> IO () -- | 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 record syntax to modify individual records. -- For example: -- --
-- defaultSettings { settingsTimeout = 20 }
--
data Settings
-- | The default settings for the Warp server. See the individual settings
-- for the default value.
defaultSettings :: Settings
-- | Port to listen on. Default value: 3000
settingsPort :: Settings -> Int
-- | Default value: HostIPv4
settingsHost :: Settings -> HostPreference
-- | What to do with exceptions thrown by either the application or server.
-- Default: ignore server-generated exceptions (see
-- InvalidRequest) and print application-generated applications to
-- stderr.
settingsOnException :: Settings -> SomeException -> IO ()
-- | What to do when a connection is open. Default: do nothing.
settingsOnOpen :: Settings -> IO ()
-- | What to do when a connection is close. Default: do nothing.
settingsOnClose :: Settings -> IO ()
-- | Timeout value in seconds. Default value: 30
settingsTimeout :: Settings -> Int
settingsIntercept :: Settings -> Request -> Maybe (Source (ResourceT IO) ByteString -> Connection -> ResourceT IO ())
-- | Use an existing timeout manager instead of spawning a new one. If
-- used, settingsTimeout is ignored. Default is Nothing
settingsManager :: Settings -> Maybe Manager
-- | Cache duratoin time of file descriptors in seconds. Default value: 10
settingsFdCacheDuration :: Settings -> Int
-- | Which host to bind.
--
-- Note: The IsString instance recognizes the following special
-- values:
--
--