Beispiel #1
0
 /// <summary>
 /// Close this instance.
 /// </summary>
 /// <returns>The close.</returns>
 public async Task Close()
 {
     if (_client != null)
     {
         Console.WriteLine("Closing Data TCP client!");
         await _client.CloseAsync();
     }
 }
Beispiel #2
0
        public async void ConnectDisconnect()
        {
            AsyncTcpClient client = new AsyncTcpClient();
            await client.ConnectAsync(localhost, port);

            Assert.True(client.IsConnected);
            await client.CloseAsync();
        }