@@ -39,6 +39,9 @@ module Network.Wai.Handler.Warp (
3939 , setFdCacheDuration
4040 , setBeforeMainLoop
4141 , setNoParsePath
42+ -- ** Getters
43+ , getPort
44+ , getHost
4245 -- ** Accessors
4346 -- | Note: these accessors are deprecated, please use the @set@ versions instead.
4447 , settingsPort
@@ -186,3 +189,15 @@ setBeforeMainLoop x y = y { settingsBeforeMainLoop = x }
186189-- Since 2.1.0
187190setNoParsePath :: Bool -> Settings -> Settings
188191setNoParsePath x y = y { settingsNoParsePath = x }
192+
193+-- | Get the listening port.
194+--
195+-- Since 2.1.1
196+getPort :: Settings -> Int
197+getPort = settingsPort
198+
199+-- | Get the interface to bind to.
200+--
201+-- Since 2.1.1
202+getHost :: Settings -> HostPreference
203+getHost = settingsHost