From df2dac6f13eb95a451142228da9900c8198e39d0 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:54:54 +0000 Subject: Utilisateur : Fcolin Date : 1/12/05 Heure : 17:47 Archivé dans $/CSharp/Ivy Commentaire: (vss 29) --- CSharp/Ivy/IvyPPC/Ivy.cs | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'CSharp/Ivy/IvyPPC') diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs index 8ca2736..7332eed 100644 --- a/CSharp/Ivy/IvyPPC/Ivy.cs +++ b/CSharp/Ivy/IvyPPC/Ivy.cs @@ -118,7 +118,7 @@ namespace IvyBus { foreach (IvyClient client in clients ) { - client.sendApplicationId(); + client.stream.sendApplicationId(applicationPriority, AppId); } } @@ -268,7 +268,7 @@ namespace IvyBus { throw new IvyException("can't open TCP service socket " + e); } - traceDebug("lib: " + libVersion + " protocol: " + IvyUDPStream.PROCOCOLVERSION + " TCP service open on port " + applicationPort); + traceDebug("lib: " + libVersion + " protocol: " + IvyUDPStreamV4.PROCOCOLVERSION + " TCP service open on port " + applicationPort); watchers = new ArrayList(); Domain[] d = parseDomains(domainbus); @@ -293,7 +293,7 @@ namespace IvyBus ((IvyWatcher) watchers[i]).start(); } } - public void SortClients() + internal void SortClients() { lock ( clients.SyncRoot ) { @@ -482,7 +482,7 @@ namespace IvyBus { foreach (IvyClient c in clients ) { - c.sendBinding(newbind); + c.stream.sendBinding(newbind); } } return newbind.key; @@ -504,7 +504,7 @@ namespace IvyBus { foreach (IvyClient c in clients ) { - c.delBinding(bind); + c.stream.delBinding(bind); } } lock( bindings.SyncRoot ) bindings.Remove( id ); @@ -570,12 +570,25 @@ namespace IvyBus { foreach (IvyClient c in clients ) { - c.sendBinding(newbind); + c.stream.sendBinding(newbind); } } return newbind.key; } - + public int Die( string target, string message ) + { + System.Collections.ArrayList v = getIvyClientsByName(target); + for (int i = 0; i < v.Count; i++) + ((IvyClient) v[i]).stream.sendDie(message); + return v.Count; + } + public int Ping( string target, string message) + { + System.Collections.ArrayList v = getIvyClientsByName(target); + for (int i = 0; i < v.Count; i++) + ((IvyClient)v[i]).stream.sendPing(message); + return v.Count; + } internal void FireDirectMessage (IvyClient app, int id, byte[] arg ) { if ( directMessageReceived != null ) @@ -818,7 +831,7 @@ namespace IvyBus { return domainaddr + ":" + port; } - } + } } } \ No newline at end of file -- cgit v1.1