@@ -64,6 +64,9 @@ module Network.Wai.Handler.Warp (
6464 -- ** Getters
6565 , getPort
6666 , getHost
67+ , getOnOpen
68+ , getOnClose
69+ , getOnException
6770 -- ** Exception handler
6871 , defaultOnException
6972 , defaultShouldDisplayException
@@ -236,6 +239,18 @@ getPort = settingsPort
236239getHost :: Settings -> HostPreference
237240getHost = settingsHost
238241
242+-- | Get the action on opening connection.
243+getOnOpen :: Settings -> SockAddr -> IO Bool
244+getOnOpen = settingsOnOpen
245+
246+-- | Get the action on closeing connection.
247+getOnClose :: Settings -> SockAddr -> IO ()
248+getOnClose = settingsOnClose
249+
250+-- | Get the exception handler.
251+getOnException :: Settings -> Maybe Request -> SomeException -> IO ()
252+getOnException = settingsOnException
253+
239254-- | A code to install shutdown handler.
240255--
241256-- For instance, this code should set up a UNIX signal