summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC/Ivy.cs
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:55:34 +0000
committerfcolin2007-02-01 09:55:34 +0000
commitaecbf057d889e5d5636c10cfe398d42f7f7b2d55 (patch)
treede47a908ba0648c50f4d570d73dd955e192e9b59 /CSharp/Ivy/IvyPPC/Ivy.cs
parentf36d73b7f54ce161f736e094f08bbee2651bbb49 (diff)
downloadivy-csharp-aecbf057d889e5d5636c10cfe398d42f7f7b2d55.zip
ivy-csharp-aecbf057d889e5d5636c10cfe398d42f7f7b2d55.tar.gz
ivy-csharp-aecbf057d889e5d5636c10cfe398d42f7f7b2d55.tar.bz2
ivy-csharp-aecbf057d889e5d5636c10cfe398d42f7f7b2d55.tar.xz
Utilisateur : Fcolin Date : 7/02/06 Heure : 10:50 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 49)
Diffstat (limited to 'CSharp/Ivy/IvyPPC/Ivy.cs')
-rw-r--r--CSharp/Ivy/IvyPPC/Ivy.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs
index b40b335..9ab06d7 100644
--- a/CSharp/Ivy/IvyPPC/Ivy.cs
+++ b/CSharp/Ivy/IvyPPC/Ivy.cs
@@ -397,19 +397,25 @@ namespace IvyBus
/// </param>
public void start(string domainbus)
{
+ int ndx = 0;
+ IPAddress localaddr;
domainbus = getDomain(domainbus);
try
{
//TODO remove ALL reverse DNS search !!!!
- IPAddress localaddr = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0];
+ //TODO possible bug applicationhost = 127.0.0.1 and not IP
+ do
+ {
+ localaddr = Dns.GetHostEntry(Dns.GetHostName()).AddressList[ndx++];
+ } while (IPAddress.IsLoopback(localaddr));
app = new MyTcpListener(IPAddress.Any, 0);
- app.Start();
applicationPort = (ushort)((IPEndPoint) app.LocalEndpoint).Port;
applicationHost = localaddr;
applicationUniqueId = string.Format("{0}-{1}-{2}",
DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond,
localaddr.ToString().Replace(".",""),
applicationPort );
+ app.Start();
}
catch (IOException e)
{
@@ -885,6 +891,7 @@ namespace IvyBus
* there might still be a lingering bug here, that we could avoid with the
* SchizoToken.
*/
+ //TODO bug multiple instance Reco car en 127.0.0.1
internal bool checkConnected(IvyClient clnt)
{
if (clnt.AppPort == 0)