Hi,<div><br></div><div>I&#39;m hoping to try out the State Synchronization Protocol for a different purpose. I&#39;m currently studing the mosh source code but my C++ skills seem to have aged a bit, and the SSP has not been factored out as a separate library. </div>
<div><br></div><div>Would there be anyone with understanding of the implementation that could give me some hints on how to reuse the SSP implementation in mosh for synchronizing another type of state?</div><div><br></div>
<div>Am I correct that this is the key to the SSP...</div><div><br></div><div><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">Network</span><span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">::</span><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">Transport</span><span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">&lt;</span><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)"> </span><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">Network</span><span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">::</span><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">UserStream</span><span class="p" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">,</span><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)"> </span><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">Terminal</span><span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">::</span><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">Complete</span><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)"> </span><span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">&gt;</span><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)"> </span><span class="o" style="margin:0px;padding:0px;border:0px;font-weight:bold;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">*</span><span class="n" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">network</span><span class="p" style="margin:0px;padding:0px;border:0px;color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:16px;white-space:pre;background-color:rgb(255,255,255)">;</span></div>
<div><br></div><div>... so I can reuse the SSP code in the src/network/ directory but I will need to implement my own classes instead of Network::UserStream and Terminal::Complete from the src/statesync/ directory?</div><div>
<br></div><div>I&#39;ll try to to figure out the required interfaces for MyState and RemoteState now...</div><div><br></div><div><br></div><div>Best regards,</div><div><br>David Eriksson</div><div><br></div><div><a href="http://www.divideandconquer.se/">http://www.divideandconquer.se/</a></div>