diff --git a/PolyChat/Models/Client.cs b/PolyChat/Models/Client.cs index 84a8fc3..b09b5e5 100644 --- a/PolyChat/Models/Client.cs +++ b/PolyChat/Models/Client.cs @@ -5,6 +5,7 @@ using SocketIOSharp.Server.Client; using Json.Net; using System.Threading; using PolyChat.Models.Exceptions; +using System.Diagnostics; namespace PolyChat.Models { @@ -12,7 +13,7 @@ namespace PolyChat.Models { private SocketIOClient connection_client = null; private SocketIOSocket connection_server = null; - private Boolean connected = false; + private Boolean connected = true; private String ipSelf; public Client(SocketIOClient connection, String ip) @@ -44,6 +45,7 @@ namespace PolyChat.Models { new Thread(() => { + Debug.WriteLine($"connected is {connected}"); //create msg Message msg = new Message(chatMessage, false, Controller.ip); diff --git a/PolyChat/Models/NetworkingController.cs b/PolyChat/Models/NetworkingController.cs index e745e88..2d00836 100644 --- a/PolyChat/Models/NetworkingController.cs +++ b/PolyChat/Models/NetworkingController.cs @@ -30,6 +30,7 @@ namespace PolyChat.Models Server = new SocketIOServer(new SocketIOServerOption(Port)); Server.OnConnection((socket) => connectNewClient(socket)); Server.Start(); + Debug.WriteLine($"Your ip is: {ownIP}"); Debug.WriteLine($"Server started, binding to port {Port}, waiting for connection..."); }