/// <summary>
        /// Send a RDPEVOR packet through data channel
        /// </summary>
        /// <param name="evorPdu">The pdu to send</param>
        /// <param name="isCompressed"> Whether to compress the pdu before send</param>
        public void SendRdpevorDataPdu(RdpevorServerPdu evorPdu, bool isCompressed)
        {
            byte[] data = PduMarshaler.Marshal(evorPdu);

            if (rdpevorDataDVC == null)
            {
                throw new InvalidOperationException("Data DVC instance of RDPEVOR is null, Dynamic virtual channel must be created before sending data.");
            }
            rdpevorDataDVC.Send(data, isCompressed);
        }
예제 #2
0
        /// <summary>
        /// Method to send a RDPINPUT_SC_READY_PDU to client.
        /// </summary>
        /// <param name="pdu">A RDPINPUT_SC_READY_PDU structure.</param>
        public void SendRdpInputScReadyPdu(RDPINPUT_SC_READY_PDU pdu)
        {
            byte[] data = PduMarshaler.Marshal(pdu);

            // Sleep some time to avoid this packet to be merged with other packets in TCP level.
            System.Threading.Thread.Sleep(PacketsInterval);
            if (rdpeiDVC == null)
            {
                throw new InvalidOperationException("DVC instance of RDPEI is null, Dynamic virtual channel must be created before sending data.");
            }
            rdpeiDVC.Send(data);
        }
 /// <summary>
 /// Method to sent a packet via RDPEGFX DVC to client.
 /// </summary>
 /// <param name="Data">The packet data to be sent to client.</param>
 public void Send(byte[] data)
 {
     if (this.rdpegfxDVC != null)
     {
         rdpegfxDVC.Send(data);
     }
 }
        private void SendPdu(EusbPdu pdu, DynamicVirtualChannel channel)
        {
            Site.Assume.IsNotNull(channel, "DynamicVirtualChannel must be initialized.");

            channel.Send(PduMarshaler.Marshal(pdu));

            Site.Log.Add(LogEntryKind.Debug, "Sending {0}: \r\n{1}\r\n", pdu.GetType().ToString(), pdu.ToString());
        }
 /// <summary>
 /// Send a Pdu
 /// </summary>
 /// <param name="pdu"></param>
 public void SendRdpeiPdu(RDPINPUT_PDU pdu)
 {
     byte[] data = PduMarshaler.Marshal(pdu);
     if (rdpeiDVC == null)
     {
         throw new InvalidOperationException("DVC instance of RDPEI is null, Dynamic virtual channel must be created before sending data.");
     }
     rdpeiDVC.Send(data);
 }
예제 #6
0
 /// <summary>
 /// Send a RDPEDISP Pdu
 /// </summary>
 /// <param name="pdu"></param>
 public void SendRdpedispPdu(RdpedispPdu pdu)
 {
     byte[] data = PduMarshaler.Marshal(pdu);
     if (RdpedispDVC == null)
     {
         throw new InvalidOperationException("DVC instance of RDPEDISP is null, Dynamic virtual channel must be created before sending data.");
     }
     RdpedispDVC.Send(data);
 }
예제 #7
0
 /// <summary>
 /// Send a RDPEGT Packet
 /// </summary>
 /// <param name="pdu"></param>
 public void SendRdpegtPdu(MAPPED_GEOMETRY_PACKET pdu)
 {
     byte[] data = PduMarshaler.Marshal(pdu);
     if (rdpegtDVC == null)
     {
         throw new InvalidOperationException("DVC instance of RDPEGT is null, Dynamic virtual channel must be created before sending data.");
     }
     rdpegtDVC.Send(data);
 }
        /// <summary>
        /// Send EFS PDU.
        /// </summary>
        /// <param name="pdu">the PDU sent to Client</param>
        public void SendRdpefsPdu(RdpefsPDU pdu)
        {
            byte[] data = PduMarshaler.Marshal(pdu);
            if (rdpefsDVC == null)
            {
                throw new InvalidOperationException("DVC instance of RDPEFS is null, Dynamic virtual channel must be created before sending data.");
            }

            //Will send compressed packet with "true" as parameter: rdpefsDVC.Send(data, true);
            rdpefsDVC.Send(data);
        }