Changes between Version 2 and Version 3 of Documentation/Tutorial/PingPong


Ignore:
Timestamp:
Jan 20, 2009, 4:37:26 PM (15 years ago)
Author:
huebsch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/Tutorial/PingPong

    v2 v3  
    11
    2 '''The Ping-Pong Example'''
     2
     3== '''The Ping-Pong Example''' ==
     4
    35
    46To help getting into using Ariba, we provide a short example of how to use the architecture. For this, assume a simple service whose simply and only intention is to exchange data packets between two participating nodes, just like playing ping pong. You will find the whole code within the package under ''sample/pingpong''.
     
    68The source files divide into the main code (''PingPong.h/.cpp'') and the used message format (declared in ''PingPongMessage.h/.cpp''). In Addition, ''main.cpp'' acts as the entry point to the ping-pong example. We will first give a high-level introduction about what the example does and later dig deeper into the code.
    79
     10'''What it does'''
     11As already mentioned, the example service simply exchanges packets between two participating network nodes. This is accomplished by using the ''Ariba'' abstraction to create a communication context and hide underlay details. The participants form a ''SpoVNet'' instance in which the first one (as the initiator) creates the instance, while the second joins. As soon as the second has successfully joined the instance, it starts sending packets to the initiator periodically. When such a packet reaches the latter, he responds by also sending a packet back. This procedure repeats, until a button is pressed.
     12