on master help sign in
configure daemon with host and port
commitffe683ae0af525c5e5dbc035d1850d9d10f3cd9e authorAgentM <agentm@themactionfaction.com> dateTue 17 Nov 2015, 16:31 (11 years ago) parentfb3e778
1 file changed+4−2
ProjectM36/Daemon.hs+4−2
ProjectM36/Daemon.hs+4−2
@@ -16,6 +16,7 @@ import System.IO (hPutStrLn, stderr)
1616import qualified Control.Distributed.Process.Extras.Internal.Types as DIT
1717import Control.Concurrent.MVar (putMVar, MVar)
1818
19+-- the state should be a mapping of remote connection to the disconnected transaction- the graph should be the same, so discon must be removed from the stm tuple
1920serverDefinition :: ProcessDefinition Connection
2021serverDefinition = defaultProcess {
2122 apiHandlers = [
@@ -60,8 +61,9 @@ launchServer daemonConfig mPortMVar = do
6061 hPutStrLn stderr ("Failed to create database connection: " ++ show err)
6162 pure False
6263 Right conn -> do
63− let port = defaultServerPort
64− etransport <- createTransport "127.0.0.1" (show port) defaultTCPParameters
64+ let hostname = bindHost daemonConfig
65+ port = bindPort daemonConfig
66+ etransport <- createTransport hostname (show port) defaultTCPParameters
6567 case etransport of
6668 Left err -> error (show err)
6769 Right transport -> do