diff options
author | fcolin | 2010-03-12 16:40:27 +0000 |
---|---|---|
committer | fcolin | 2010-03-12 16:40:27 +0000 |
commit | ebc2a8ef21bd90e753cf9b88ea186b0c87775de3 (patch) | |
tree | a872054e01243a0cb1a000f36f8a1e64e1f87914 /Ivy/Ivy.cs | |
parent | ddccd3d8f4fd59fb19fa6262460bbc5e2e67eac7 (diff) | |
download | ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.zip ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.tar.gz ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.tar.bz2 ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.tar.xz |
mise en conformité des messages ping /pong
start regexpid a 0
catch plantage NULL ref
Correction pb a la fermeture d'ivy
Diffstat (limited to 'Ivy/Ivy.cs')
-rw-r--r-- | Ivy/Ivy.cs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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;
}
|