@@ -39,6 +39,9 @@ module Network.Wai.Handler.Warp (
39 , setFdCacheDuration
39 , setFdCacheDuration
40 , setBeforeMainLoop
40 , setBeforeMainLoop
41 , setNoParsePath
41 , setNoParsePath
42 -- ** Accessors
45 -- ** Accessors
43 -- | Note: these accessors are deprecated, please use the @set@ versions instead.
46 -- | Note: these accessors are deprecated, please use the @set@ versions instead.
44 , settingsPort
47 , settingsPort
@@ -186,3 +189,15 @@ setBeforeMainLoop x y = y { settingsBeforeMainLoop = x }
186-- Since 2.1.0
189-- Since 2.1.0
187setNoParsePath :: Bool -> Settings -> Settings
190setNoParsePath :: Bool -> Settings -> Settings
188setNoParsePath x y = y { settingsNoParsePath = x }
191setNoParsePath x y = y { settingsNoParsePath = x }
193+-- | Get the listening port.
196+getPort :: Settings -> Int
197+getPort = settingsPort
199+-- | Get the interface to bind to.
202+getHost :: Settings -> HostPreference
203+getHost = settingsHost