コード例 #1
0
 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
         }
     }
 }
コード例 #2
0
 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
         }
     }
 }