Beispiel #1
0
        public async void ServerClientConnectionInitialization()
        {
            using (var server = new ExampleServer())
                using (var client = new ExampleClient())
                {
                    server.Start();
                    await Task.Delay(500);

                    Assert.True(server.IsRunning);

                    client.Connect();
                    await Task.Delay(500);

                    Assert.True(client.IsConnected);

                    while (true)
                    {
                        Thread.Sleep(1);
                    }
                }
        }
    void Start()
    {
        client = new ExampleClient();

        client.Connect(host, port);
    }