From f0ca4915ee9eec18d05c60e3cf0248b50fab7310 Mon Sep 17 00:00:00 2001 From: jestin Date: Mon, 24 Jul 2006 13:33:15 +0000 Subject: adding ping and pong --- src/Probe.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/Probe.java') diff --git a/src/Probe.java b/src/Probe.java index 0d3eed7..8ced8e5 100644 --- a/src/Probe.java +++ b/src/Probe.java @@ -7,6 +7,8 @@ * (c) CENA * * Changelog: + * 1.2.12 + * - .ping is back * 1.2.9 * - added the .time command * - added the .bound * @@ -71,7 +73,8 @@ public class Probe implements IvyApplicationListener, IvyMessageListener, IvyBin ".bound CLIENT\t\t\t* lists the subscriptions of a client, .bound * to get all\n"+ ".bound\t\t\t\t* lists the probe's subscriptions\n"+ ".where CLIENT\t\t\t* displays the host where a client runs\n"+ - ".time COUNT MESSAGE\t\t\t* measures the time it takes to send COUNT messages\n" + ".time COUNT MESSAGE\t\t\t* measures the time it takes to send COUNT messages\n"+ + ".ping CLIENT\t\t\t* measures the roundtrip time in millisecond to reach a client\n" ; public static final String helpmsg = @@ -274,6 +277,21 @@ public class Probe implements IvyApplicationListener, IvyMessageListener, IvyBin for (int i=0;i "+((IvyClient)v.elementAt(i)).getApplicationName()); } + } else if ( s.lastIndexOf(".ping ")>=0) { + String target=s.substring(6); + Vector v=bus.getIvyClientsByName(target); + if (v.size()==0) println("no Ivy client with the name \""+target+"\""); + for (int i=0;i ping not sent, the remote client must have disconnected"); + } + } } else if ( s.lastIndexOf(".where ")>=0) { String target=s.substring(7); Vector v=bus.getIvyClientsByName(target); -- cgit v1.1