static public bool ReplyBadPacket( IController ctrl, uint flags ) { //What is this for? Nack + Ping? What can the TinyCLR possibly do with this information? OutgoingMessage msg = new OutgoingMessage( ctrl, new WireProtocol.Converter(), Commands.c_Monitor_Ping, Flags.c_NonCritical | Flags.c_NACK | flags, null ); return msg.Send(); }
static public bool ReplyBadPacket(IController ctrl, uint flags) { //What is this for? Nack + Ping? What can the TinyCLR possibly do with this information? OutgoingMessage msg = new OutgoingMessage(ctrl, new WireProtocol.Converter(), Commands.c_Monitor_Ping, Flags.c_NonCritical | Flags.c_NACK | flags, null); return(msg.Send()); }
public void SendOutgoing(string[] args) { string sourceFile = args.GetRequiredValue(0); string smtpServer = args.GetRequiredValue(1); OutgoingMessage outgoing = this.Agent.ProcessOutgoing(File.ReadAllText(sourceFile)); outgoing.Send(smtpServer); }
public static void RunOutgoing() { SocketAddress addr = null; int sentCount = 0; try { int runningCounter = 0; long lastTime = CurrentTime; for (int i = 0; i < messageCount; i++) { long currentTime = CurrentTime; long interval = currentTime - lastTime; if (interval > 1000) { lastTime = currentTime; Logit("Sent " + sentCount + " messages" + " in the last " + interval + "ms"); sentCount = 0; } OutgoingMessage outMessage = new OutgoingMessage(); Debug.Assert(rdpConnection != null, "In TestRDPClient.RunOutgoing, rdpConnection is null!"); outMessage.Write("Hello World from CLIENT! - MSG " + runningCounter++); bool trying = true; while (trying) { try { outMessage.Send(rdpConnection); trying = false; } catch (Exception e) { if (e.Message == "Error - insufficient resources to send data") { Thread.Sleep(10); } else { throw; } } } sentCount++; } Console.WriteLine("RunOutgoing sent a total of " + messageCount + " messages"); } catch (Exception e) { Logit("TestRDPClient.RunOutgoing got error: " + e.ToString()); Logit("TestRDPClient.RunOutgoing sentCount = " + sentCount); } }
public bool Reply( Converter converter, uint flags, object payload ) { OutgoingMessage msgReply = new OutgoingMessage( this, converter, flags, payload ); return msgReply.Send(); }
public bool Reply(Converter converter, uint flags, object payload) { OutgoingMessage msgReply = new OutgoingMessage(this, converter, flags, payload); return(msgReply.Send()); }