X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FInteraction.hs;h=4c93b41abf258999aa329121c98d90b43d666ffa;hp=5da428d4968ff225e31ac84fa003f013fbdf3d77;hb=0214f070b80791323430e21b53bcbe8a77b71b23;hpb=05375cbaf2dda1e8146f6cdbbd635e59de54a732 diff --git a/Network/HTTP/Lucu/Interaction.hs b/Network/HTTP/Lucu/Interaction.hs index 5da428d..4c93b41 100644 --- a/Network/HTTP/Lucu/Interaction.hs +++ b/Network/HTTP/Lucu/Interaction.hs @@ -31,6 +31,7 @@ import OpenSSL.X509 data Interaction = Interaction { itrConfig :: !Config + , itrLocalPort :: !PortNumber , itrRemoteAddr :: !SockAddr , itrRemoteCert :: !(Maybe X509) , itrResourcePath :: !(Maybe [String]) @@ -82,8 +83,8 @@ defaultPageContentType :: Strict.ByteString defaultPageContentType = C8.pack "application/xhtml+xml" -newInteraction :: Config -> SockAddr -> Maybe X509 -> Maybe Request -> IO Interaction -newInteraction !conf !addr !cert !req +newInteraction :: Config -> PortNumber -> SockAddr -> Maybe X509 -> Maybe Request -> IO Interaction +newInteraction !conf !port !addr !cert !req = do request <- newTVarIO req responce <- newTVarIO Response { resVersion = HttpVersion 1 1 @@ -117,6 +118,7 @@ newInteraction !conf !addr !cert !req return Interaction { itrConfig = conf + , itrLocalPort = port , itrRemoteAddr = addr , itrRemoteCert = cert , itrResourcePath = Nothing