Exemple #1
0
 public static Message WriteLineAndGetReply(this Node node, string message, bool catchError = true)
 {
     try
     {
         return(Server.WriteLineAndGetReply(message, TimeSpan.FromSeconds(30), node.TcpClient));
     }
     catch (Exception e)
     {
         if (catchError)
         {
             Program.Log($"------------\nError sending broadcast!\n{e.Message}\n{message}\n------------", true);
         }
         else
         {
             throw e;
         }
     }
     return(null);
 }