summaryrefslogtreecommitdiff
path: root/Ivy/Ivy.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ivy/Ivy.cs')
-rw-r--r--Ivy/Ivy.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Ivy/Ivy.cs b/Ivy/Ivy.cs
index 1dfd967..922bb27 100644
--- a/Ivy/Ivy.cs
+++ b/Ivy/Ivy.cs
@@ -198,7 +198,7 @@ namespace IvyBus
private static readonly string DefaultDomain = "127.0.0.1:" + DefaultPort;
internal int protocolVersion = 3;
private static bool debugProtocol; // false by default runtime
- private static int serial; /* an unique ID for each regexp */ // 0 by default runtime
+ private static int serial = -1; /* an unique ID for each regexp */ // -1 to start numbering at 0
private MyTcpListener app;
private List<IvyWatcher> watchers;
private Thread serverThread; // to ensure quick communication of the end
@@ -887,9 +887,12 @@ namespace IvyBus
/// <returns></returns>
public int Ping(string target, string message)
{
+ int id = (int)DateTime.Now.Ticks;
ReadOnlyCollection<IvyClient> v = GetClientsByName(target);
foreach (IvyClient clnt in v)
- clnt.stream.TokenPing(message);
+ {
+ clnt.stream.TokenPing(id, message);
+ }
return v.Count;
}