diff options
author | fcolin | 2007-02-01 09:43:34 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:43:34 +0000 |
commit | 8e53cdb6339b4589ed12ca27cf62a8d968aec921 (patch) | |
tree | 71eec556d51496ab761ce89031c32675397585b1 | |
parent | b0d3e2054137c49cc7ef359e4137ab0c3f9180aa (diff) | |
download | ivy-csharp-8e53cdb6339b4589ed12ca27cf62a8d968aec921.zip ivy-csharp-8e53cdb6339b4589ed12ca27cf62a8d968aec921.tar.gz ivy-csharp-8e53cdb6339b4589ed12ca27cf62a8d968aec921.tar.bz2 ivy-csharp-8e53cdb6339b4589ed12ca27cf62a8d968aec921.tar.xz |
Utilisateur : Fcolin Date : 7/02/06 Heure : 10:50 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 49)
-rw-r--r-- | CSharp/Ivy/Ivy/Ivy.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CSharp/Ivy/Ivy/Ivy.cs b/CSharp/Ivy/Ivy/Ivy.cs index b40b335..9ab06d7 100644 --- a/CSharp/Ivy/Ivy/Ivy.cs +++ b/CSharp/Ivy/Ivy/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)
|