Summary
Although there are many Ping-Pongs examples and all this might sound confusing, just remember there are three basic steps in the Ping-Pong examples:
1. Setup the SST infrastructure on the machine that will represent Ping and the machine that will represent Pong. Remember, on the Pong machine, the Pong Factory is created and exported for you. The helper methods used here are SstPingPong*setupPing:pinging: and SstPingPong*setupPong:ponging:.
2. Create the instances of SstPingPong* representing Ping on one machine and Pong on the other. This is done through the helper mehtod SstPingPong*createPingAndPong.
3. Ask Ping to start sending messages to Pong. This is done by sending the messager start: @value with: @object to Ping. Remember, Ping is the instance of SstPingPong* that is returned to you from the SstPingPong*setupPing:pinging: message.
The steps to be taken are summarized in the table below for the by-value example. When steps are shown in the same row of the table, the respective order is immaterial. However, you should complete both steps in a row before moving on to the next row.
Ping (client machine)
Pong (server machine)
SstPingPongByValue
setupPing: 'tcp/ping.com:4567'
pinging: 'tcp/pong.com:4567'
 
SstPingPongByValue
setupPong: 'tcp/pong.com:4567'
ponging: 'tcp/ping.com:4567'
 
SstPingPongByValue
createPingAndPong start: 3 with: #(1 2)
 
SstPingPongByValue
cleanUpPingPong
 
SstPingPongByValue
cleanUpPingPong
Note that the SstPingPong class comment has more details about what each example does and how it is run. The class comment also describes the expected output and several options you can load into the examples.
 
Last modified date: 05/12/2020