Note that there are some explanatory texts on larger screens.

plurals
  1. POClient/Server applications communication over the command line with threads c++
    primarykey
    data
    text
    <p>I have two applications one is a client the other is a server. The server launches the client as a sub thread. The client then outputs its commands via its standard out. The server waits for a command and responses accordingly. </p> <p>Basically client server via the standard out. </p> <p>For example:</p> <pre><code>client &gt;&gt; Move north Server &gt;&gt; Your new location is {2,3} client &gt;&gt; Move north Server &gt;&gt; Your new location is {2,2} client &gt;&gt; Shoot east Server &gt;&gt; Projectile 66638 heading east {3,2} </code></pre> <p>The problem is that i don't know how to connect the two applications together so the server and read and response to the client application. </p> <p>The reason that I would like to use the command line as the communication layer is that I want to keep the creation of the client as easy as possible. </p> <p>Also there may be more then one client at a time, The clients should be able to communicate with the server interdependently of each other. (they should not be able to see each others communications) </p> <p>Currently I am launching the application via the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx" rel="nofollow">CreateProccess</a>() function. This function makes it easy to set up the initial command line parameters of the application. just not the communication afterwards. </p> <p>My Question is: </p> <ul> <li>How does a server application that launches a client application as a thread, read/writes the clients standard output? </li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload