Verified Commit 4a849456 authored by Camil Staps's avatar Camil Staps 🚀

Add new_arg key to options for connect() JavaScript function to distinguish...

Add new_arg key to options for connect() JavaScript function to distinguish between different renderers
parent f7471944
......@@ -41,7 +41,7 @@ tcpQueueEmpty :: SimpleSDSLens Bool
serveElectron ::
!([String] EngineOptions -> EngineOptions)
!(ElectronProcess UniversalConnectionDetails -> Task Connection)
!(String ElectronProcess UniversalConnectionDetails -> Task Connection)
!*World -> *World
runInElectron :: !ElectronProcess !(JSVal *JSWorld -> *JSWorld) -> Task ()
......@@ -102,7 +102,7 @@ tcpConnections =: sdsFocus "tcpConnections" (memoryStore "Electron" (Just 'Data.
serveElectron ::
!([String] EngineOptions -> EngineOptions)
!(ElectronProcess UniversalConnectionDetails -> Task Connection)
!(String ElectronProcess UniversalConnectionDetails -> Task Connection)
!*World -> *World
serveElectron modOpts startConnection w = doTasksWithOptions
(\cli opts
......@@ -195,7 +195,7 @@ where
Nothing ->
case msg.TCPMsg.type of
"new" ->
startConnection processId (connectionDetails processId) >>- \conn ->
startConnection msg.val processId (connectionDetails processId) >>- \conn ->
set (Just conn) (tcpConnection processId) @!
()
_ ->
......
......@@ -29,7 +29,7 @@ class Component {
},
}).then (abc => {
const socket=net.createConnection (opts.port,opts.host,() => {
socket.write (JSON.stringify ({type: 'new', val: ''}) + '\n');
socket.write (JSON.stringify ({type: 'new', val: opts.new_arg || ''}) + '\n');
});
const component=new Component (abc,socket);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment