mono fixes, tweaking service mode

This commit is contained in:
mark 2009-08-07 07:07:15 +00:00
parent 59a86c7a7d
commit 0f73c81a6a
6 changed files with 53 additions and 32 deletions

View file

@ -22,6 +22,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Threading;
using Server;
@ -69,6 +70,17 @@ namespace Server.Network
s.Listen( 8 );
if ( ipep.Address.Equals( IPAddress.Any ) ) {
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
foreach ( NetworkInterface adapter in adapters ) {
IPInterfaceProperties properties = adapter.GetIPProperties();
foreach ( IPAddressInformation unicast in properties.UnicastAddresses ) {
Console.WriteLine( "Listening: {0}:{1}", unicast.Address, ipep.Port );
}
}
/*
try {
Console.WriteLine( "Listening: {0}:{1}", IPAddress.Loopback, ipep.Port );
@ -80,6 +92,7 @@ namespace Server.Network
Console.WriteLine( "Listening: {0}:{1}", ip[i], ipep.Port );
}
catch { }
*/
}
else {
Console.WriteLine( "Listening: {0}:{1}", ipep.Address, ipep.Port );