/// <summary> /// Send some random tunnel data /// </summary> /// <param name="requestedProtocol">Which tunnel to be used, reliable or lossy</param> public void SendRandomTunnelData(TransportMode udpTransportMode) { RdpemtServer rdpemtServer = rdpemtServerR; if (udpTransportMode == TransportMode.Lossy) { rdpemtServer = rdpemtServerL; } Random rnd = new Random(); for (int i = 0; i < 3; i++) { int len = rnd.Next(100, 500); byte[] randomData = new byte[len]; rnd.NextBytes(randomData); rdpemtServer.Send(randomData); } }
/// <summary> /// Send a Dynamic virtual channel PDU /// </summary> /// <param name="pdu"></param> public void Send(DynamicVCPDU pdu) { rdpemtServer.Send(pduBuilder.ToRawData(pdu)); }