/// <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(); } }
public async void ConnectDisconnect() { AsyncTcpClient client = new AsyncTcpClient(); await client.ConnectAsync(localhost, port); Assert.True(client.IsConnected); await client.CloseAsync(); }