private async Task SendInternalAsync(string message, string host, int port) { using (var client = new TcpSender()) { try { await client.SendAsync(message, host, port); } catch (Exception) { // if the ip doesn't respond then it doesn't have a client } } }
private void SendInternal(string message, string host, int port) { using (var client = new TcpSender()) { try { client.Send(message, host, port); } catch (Exception) { // if the ip doesn't respond then it doesn't have a client } } }