Compare commits

...
Sign in to create a new pull request.

2 commits

26 changed files with 11 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

View file

@ -40,12 +40,21 @@ public class Server : MonoBehaviour {
disconnectIndex = new List<int>();
try {
server = new TcpListener(IPAddress.Any, Port);
IPHostEntry hostEntry = Dns.GetHostEntry(Dns.GetHostName());
IPAddress localAddress = IPAddress.Any;
foreach(IPAddress ip in hostEntry.AddressList){
if(ip.AddressFamily==System.Net.Sockets.AddressFamily.InterNetwork){
localAddress = ip;
break;
}
}
server = new TcpListener(localAddress, Port);
server.Start();
Startlistening();
serverStarted = true;
Debug.Log("Server has started on port:" + Port.ToString());
Debug.Log("Server has started on IP:" + localAddress.ToString());
}
catch (Exception e) {
Debug.Log("Socket Error " + e.Message);
@ -274,4 +283,4 @@ public class ServerClient {
tcp = clientSocket;
ClientObj = new List<GameObject>();
}
}
}