IPC: Starting A Server By A Client

65 views
Skip to first unread message

Arnim Schachtschabel

unread,
Jun 10, 2016, 11:01:14 AM6/10/16
to Haxe


Hello Community,

I would like to let two local applications communicate with each other. A client retrieves informations from the server (a simple IPC).

The implementation itself is no big deal (it's a socket server).

I did not get out yet, how I can have the client start the server out of its own process. Otherwise the user would have to start the client and the server manually. He then would have to take care to start the server first. I would like to cloak this process for the user, as he should not be bothered with the technical details. In the documentation this is mentioned, of cause.

Is it possible?
Can you help me out?

Kind regards
Arnim

Hugh

unread,
Jun 13, 2016, 12:57:21 AM6/13/16
to Haxe
You can use a Sys.command to launch the server.
Depending on what system you are on, you could use this command to start a shell process with the "&" to launch in the background, and possibly a output-redirect to log file if you are keen.

Hugh

Juraj Kirchheim

unread,
Jun 13, 2016, 1:20:42 AM6/13/16
to haxe...@googlegroups.com
There's also sys.io.Process which may be more suitable. You can then use the child processes stdio streams to communicate with it.

Best,
Juraj

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Arnim Schachtschabel

unread,
Jun 13, 2016, 3:14:26 AM6/13/16
to Haxe
Hello Hugh, hello Juraj,

thank you for your replies. I will try them out both.

Kind regards
Arnim
Reply all
Reply to author
Forward
0 new messages