module Network.Wai.Handler.Warp (
run
, runSettings
, runSettingsSocket
, runSettingsConnection
, runSettingsConnectionMaker
, runSettingsConnectionMakerSecure
, Settings
, defaultSettings
, setPort
, setHost
, setOnException
, setOnExceptionResponse
, setOnOpen
, setOnClose
, setTimeout
, setManager
, setFdCacheDuration
, setBeforeMainLoop
, setNoParsePath
, setInstallShutdownHandler
, setServerName
, getPort
, getHost
, settingsPort
, settingsHost
, settingsOnException
, settingsOnExceptionResponse
, settingsOnOpen
, settingsOnClose
, settingsTimeout
, settingsManager
, settingsFdCacheDuration
, settingsBeforeMainLoop
, settingsNoParsePath
, exceptionResponseForDebug
, defaultShouldDisplayException
, HostPreference (..)
, Port
, InvalidRequest (..)
, ConnSendFileOverride (..)
, Connection (..)
, socketConnection
, warpVersion
, InternalInfo (..)
, HeaderValue
, IndexedHeader
, requestMaxIndex
, module Network.Wai.Handler.Warp.Timeout
, module Network.Wai.Handler.Warp.FdCache
, module Network.Wai.Handler.Warp.Date
, recvRequest
, sendResponse
) where
import Network.Wai.Handler.Warp.Date
import Network.Wai.Handler.Warp.FdCache
import Network.Wai.Handler.Warp.Header
import Network.Wai.Handler.Warp.Request
import Network.Wai.Handler.Warp.Response
import Network.Wai.Handler.Warp.Run
import Network.Wai.Handler.Warp.Settings
import Network.Wai.Handler.Warp.Timeout
import Network.Wai.Handler.Warp.Types
import Control.Exception (SomeException)
import Network.Wai (Request, Response)
import Network.Socket (SockAddr)
import Data.Streaming.Network (HostPreference)
import Data.ByteString (ByteString)
setPort :: Int -> Settings -> Settings
setPort x y = y { settingsPort = x }
setHost :: HostPreference -> Settings -> Settings
setHost x y = y { settingsHost = x }
setOnException :: (Maybe Request -> SomeException -> IO ()) -> Settings -> Settings
setOnException x y = y { settingsOnException = x }
setOnExceptionResponse :: (SomeException -> Response) -> Settings -> Settings
setOnExceptionResponse x y = y { settingsOnExceptionResponse = x }
setOnOpen :: (SockAddr -> IO Bool) -> Settings -> Settings
setOnOpen x y = y { settingsOnOpen = x }
setOnClose :: (SockAddr -> IO ()) -> Settings -> Settings
setOnClose x y = y { settingsOnClose = x }
setTimeout :: Int -> Settings -> Settings
setTimeout x y = y { settingsTimeout = x }
setManager :: Manager -> Settings -> Settings
setManager x y = y { settingsManager = Just x }
setFdCacheDuration :: Int -> Settings -> Settings
setFdCacheDuration x y = y { settingsFdCacheDuration = x }
setBeforeMainLoop :: IO () -> Settings -> Settings
setBeforeMainLoop x y = y { settingsBeforeMainLoop = x }
setNoParsePath :: Bool -> Settings -> Settings
setNoParsePath x y = y { settingsNoParsePath = x }
getPort :: Settings -> Int
getPort = settingsPort
getHost :: Settings -> HostPreference
getHost = settingsHost
setInstallShutdownHandler :: (IO () -> IO ()) -> Settings -> Settings
setInstallShutdownHandler x y = y { settingsInstallShutdownHandler = x }
setServerName :: ByteString -> Settings -> Settings
setServerName x y = y { settingsServerName = x }