diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-25 08:10:13 +0000 |
| commit | c015d586d22b69078b6da61858e5675793856b0b (patch) | |
| tree | efbc9881cf59363abef52a0beb5eedf9e81a224a /sources/protocols/implementations/PingPongProtocol.java | |
| parent | 62fe28f0b0b0c9ebde18a6dc33907889ff3aa21b (diff) | |
JAutoDoc :)
Diffstat (limited to 'sources/protocols/implementations/PingPongProtocol.java')
| -rw-r--r-- | sources/protocols/implementations/PingPongProtocol.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sources/protocols/implementations/PingPongProtocol.java b/sources/protocols/implementations/PingPongProtocol.java index a2886f9..5df152f 100644 --- a/sources/protocols/implementations/PingPongProtocol.java +++ b/sources/protocols/implementations/PingPongProtocol.java @@ -1,23 +1,47 @@ +/* + * VS is (c) 2008 by Paul C. Buetow + * vs@dev.buetow.org + */ package protocols.implementations; import core.VSMessage; import protocols.VSProtocol; +// TODO: Auto-generated Javadoc +/** + * The Class PingPongProtocol. + */ public class PingPongProtocol extends VSProtocol { + + /** The client counter. */ private int clientCounter; + + /** The server counter. */ private int serverCounter; + /** + * Instantiates a new ping pong protocol. + */ public PingPongProtocol() { setClassname(getClass().toString()); } + /* (non-Javadoc) + * @see events.VSEvent#onInit() + */ protected void onInit() { } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientReset() + */ protected void onClientReset() { clientCounter = 0; } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientStart() + */ protected void onClientStart() { VSMessage message = new VSMessage(getClassname()); message.setBoolean("fromClient", true); @@ -25,6 +49,9 @@ public class PingPongProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#onClientRecv(core.VSMessage) + */ protected void onClientRecv(VSMessage recvMessage) { if (!recvMessage.getBoolean("fromServer")) return; @@ -37,10 +64,16 @@ public class PingPongProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#onServerReset() + */ protected void onServerReset() { serverCounter = 0; } + /* (non-Javadoc) + * @see protocols.VSProtocol#onServerRecv(core.VSMessage) + */ protected void onServerRecv(VSMessage recvMessage) { if (!recvMessage.getBoolean("fromClient")) return; @@ -53,6 +86,9 @@ public class PingPongProtocol extends VSProtocol { sendMessage(message); } + /* (non-Javadoc) + * @see protocols.VSProtocol#toString() + */ public String toString() { return super.toString(); } |
