A DYNVC_SOFT_SYNC_REQUEST PDU is sent by a DVC server manager over the DRDYNVC static virtual channel on the main RDP connection.
Наследование: RequestDvcPDU
        /// <summary>
        /// Expect a DYNVC_SOFT_SYNC_RESPONSE PDU.
        /// </summary>
        public SoftSyncReqDvcPDU ExpectSoftSyncReqPDU(TimeSpan timeout, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_UDP_Reliable)
        {
            DateTime endTime = DateTime.Now + timeout;

            while (DateTime.Now < endTime)
            {
                if (unprocessedDVCPacketBuffer.Count > 0)
                {
                    lock (unprocessedDVCPacketBuffer)
                    {
                        for (int i = 0; i < unprocessedDVCPacketBuffer.Count; i++)
                        {
                            if (transportType == unprocessedDVCPacketBuffer[i].TransportType &&
                                unprocessedDVCPacketBuffer[i].PDU is SoftSyncReqDvcPDU)
                            {
                                SoftSyncReqDvcPDU capReq = unprocessedDVCPacketBuffer[i].PDU as SoftSyncReqDvcPDU;
                                unprocessedDVCPacketBuffer.RemoveAt(i);
                                return(capReq);
                            }
                        }
                    }
                }

                Thread.Sleep(this.waitInterval);
            }
            return(null);
        }
Пример #2
0
        /// <summary>
        /// Send DYNVC_SOFT_SYNC_REQUEST PDU.
        /// </summary>
        private void SendSoftSyncRequestPDU(SoftSyncReqFlags_Value flags, ushort numberOfTunnels = 0, SoftSyncChannelList[] channelList = null, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_TCP)
        {
            SoftSyncReqDvcPDU pdu = pduBuilder.CreateSoftSyncReqPdu(flags, numberOfTunnels, channelList);

            this.Send(pdu, transportType);
        }