public Client(NetPeer peer, ServerNetEventListener server) { NetPeer = peer; _server = server; _server.ConnectedClients.Add(NetPeer.Id, this); Console.WriteLine($"Connected new client. ClientId: {NetPeer.Id}"); }
private static void Main(string[] args) { Console.WriteLine("Start application."); var operation = "start"; while (operation == "start") { _server = new ServerNetEventListener(); _server.Start(15000); Console.ReadKey(); _server.Stop(); operation = Console.ReadLine(); } }