private static void clientThread() { var s = new PlayerClient() { Name = Guid.NewGuid().ToString(), Connection = new ServerConnection() { Port = port, ServerIP = ip, } }; s.ConnectToServer(); while(s.Connection.StreamToServer == null) { } while (true) { s.Connection.SendTestMessage(); Thread.Sleep(100); Interlocked.Add(ref messagesSent, 1); } }
public MainWindow() { player = new PlayerClient(); InitializeComponent(); DataContext = player; }