You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A distributed [DevOps Code RealTime](https://www.hcl-software.com/devops-code-realtime) application consisting of two executables that send ping and pong messages back and forth. The applications communicate with each other using the library [TCP server](../TcpServer/).
3
+
4
+
## Usage
5
+
Start each application with command-line arguments specifying a local and remote port. For example:
In this case the started executable will listen for incoming messages on port 15000 and send outgoing messages to port 16000. The other application should then be started with the reversed arguments, i.e. with `-port=16000 -remotePort=15000`. It is assumed that both applications run on the same machine. If you want to run them on separate machines, edit `PingPongServer::init()` to add another command-line argument for specifying the remote hostname.
11
+
12
+
Initially both applications will wait for each other to send the first event, so nothing will happen. There are several ways to make the ping pong game start:
13
+
* pass the `-injectFirstPing` argument to one of applications. Then the first message will be injected programmatically from within the application. For example:
* inject either the "ping" or "pong" event on the "PingPongServer::player" port. You can do this from another application by using the JSON API provided by [TCP server](../TcpServer/).
19
+
* attach to one of the applications using the Code RealTime and send the "timeout" event to the "Player::timer" port.
0 commit comments