diff options
author | fcolin | 2007-02-01 09:54:52 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:54:52 +0000 |
commit | ce08b27551323c7a3d3572399ea6e1f79e651c96 (patch) | |
tree | 5283abab5c03eb962eb40d7620ce9dd05d021258 /CSharp | |
parent | 1af4e97ea8bb5dd7792f2acc93b98d07bbaef13b (diff) | |
download | ivy-csharp-ce08b27551323c7a3d3572399ea6e1f79e651c96.zip ivy-csharp-ce08b27551323c7a3d3572399ea6e1f79e651c96.tar.gz ivy-csharp-ce08b27551323c7a3d3572399ea6e1f79e651c96.tar.bz2 ivy-csharp-ce08b27551323c7a3d3572399ea6e1f79e651c96.tar.xz |
Utilisateur : Fcolin Date : 30/11/05 Heure : 10:27 Archivé dans $/CSharp/Ivy Commentaire: (vss 28)
Diffstat (limited to 'CSharp')
-rw-r--r-- | CSharp/Ivy/IvyPPC/Ivy.cs | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs index 0790854..8ca2736 100644 --- a/CSharp/Ivy/IvyPPC/Ivy.cs +++ b/CSharp/Ivy/IvyPPC/Ivy.cs @@ -15,6 +15,7 @@ namespace IvyBus using System.Windows.Forms;
using System.Globalization;
using System.Text.RegularExpressions;
+ using System.Text;
/// <summary> The Main bus Class
/// </summary>
@@ -76,15 +77,18 @@ namespace IvyBus {
get
{
- string s = appName + " clients are: ";
+ StringBuilder s = new StringBuilder();
+ s.Append(appName);
+ s.Append( " clients are: " );
lock( clients.SyncRoot )
{
foreach (IvyClient client in clients )
{
- s += client.ApplicationName + " ";
+ s.Append(client.ApplicationName);
+ s.Append( " " );
}
}
- return s;
+ return s.ToString();
}
}
@@ -153,8 +157,6 @@ namespace IvyBus /// the name of the application on the bus
internal string appName;
- /// the protocol version number
- internal const int PROCOCOLVERSION = 4;
/// the port for the UDP rendez vous, if none is supplied
internal const int DEFAULT_PORT = 2010;
// client default priority
@@ -266,7 +268,7 @@ namespace IvyBus {
throw new IvyException("can't open TCP service socket " + e);
}
- traceDebug("lib: " + libVersion + " protocol: " + PROCOCOLVERSION + " TCP service open on port " + applicationPort);
+ traceDebug("lib: " + libVersion + " protocol: " + IvyUDPStream.PROCOCOLVERSION + " TCP service open on port " + applicationPort);
watchers = new ArrayList();
Domain[] d = parseDomains(domainbus);
@@ -302,13 +304,16 @@ namespace IvyBus public string domains(string toparse)
{
- string s = "broadcasting on ";
+ StringBuilder s = new StringBuilder("broadcasting on ");
Ivy.Domain[] d = parseDomains(toparse);
for (int index = 0; index < d.Length; index++)
{
- s += d[index].Domainaddr + ":" + d[index].Port + " ";
+ s.Append(d[index].Domainaddr);
+ s.Append(":");
+ s.Append(d[index].Port);
+ s.Append( " " );
}
- return s;
+ return s.ToString();
}
internal Domain[] parseDomains(string domainbus)
@@ -766,7 +771,7 @@ namespace IvyBus {
traceDebug("Error IvyServer exception: " + e.Message);
- Console.Out.WriteLine("Ivy server socket reader caught an exception " + e.Message);
+ Console.Error.WriteLine("Ivy server socket reader caught an exception " + e.Message);
// e.printStackTrace();
}
catch (SocketException e)
|