diff options
Diffstat (limited to 'CSharp/Ivy/IvyPPC/Ivy.cs')
-rw-r--r-- | CSharp/Ivy/IvyPPC/Ivy.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs index c97b545..5818949 100644 --- a/CSharp/Ivy/IvyPPC/Ivy.cs +++ b/CSharp/Ivy/IvyPPC/Ivy.cs @@ -295,6 +295,24 @@ namespace IvyBus }
return count;
}
+ /// <summary> Send a formated message to someone on the bus
+ /// </summary>
+ /// <remarks>
+ /// Performs a pattern matching according to everyone's regexps, and sends
+ /// the results to the relevant ivy agents.
+ /// There is one thread for each client connected, we could also
+ /// create another thread each time we send a message.
+ /// </remarks>
+ /// <param name='format'>A string message format to build the message
+ /// <param name='args'>args used in message format
+ /// </param>
+ /// <returns>the number of messages actually sent
+ ///
+ /// </returns>
+ public int sendMsg(string format, params object[] args )
+ {
+ return sendMsg( string.Format( format, args ) );
+ }
/// <summary> Subscribes to a regular expression.
/// </summary>
@@ -470,7 +488,7 @@ namespace IvyBus throw new IvyException("(callCallback) Not regexp matching id " + key);
}
if ( syncControl != null )
- syncControl.Invoke( callback, new object[]{client,tab});
+ syncControl.Invoke( callback, new object[]{client,tab.Clone()});
else callback(client, tab);
}
|