Example #1
0
        /// <summary>
        /// Create graphic dynamic virtual channel over UDP transport.
        /// </summary>
        private bool InitializeForSoftSync(DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_UDP_Reliable)
        {
            uint?channelId = null;

            if (!rdpedycServer.IsMultipleTransportCreated(transportType))
            {
                rdpedycServer.CreateMultipleTransport(transportType);

                this.TestSite.Log.Add(LogEntryKind.Comment, "Expect for Client Initiate Multitransport PDU to indicate that the client was able to successfully complete the multitransport initiation request.");
                rdpbcgrAdapter.WaitForPacket <Client_Initiate_Multitransport_Response_PDU>(waitTime);
                TestSite.Assert.IsTrue(
                    rdpbcgrAdapter.SessionContext.ClientInitiateMultitransportResponsePDU.hrResponse == HrResponse_Value.S_OK,
                    "hrResponse field should be {0}", HrResponse_Value.S_OK);

                channelId = DynamicVirtualChannel.NewChannelId();

                List <uint> list = new List <uint>();
                list.Add((uint)channelId);

                Dictionary <TunnelType_Value, List <uint> > channelListDic = new Dictionary <TunnelType_Value, List <uint> >();

                TunnelType_Value tunnelType = TunnelType_Value.TUNNELTYPE_UDPFECR;
                if (transportType == DynamicVC_TransportType.RDP_UDP_Lossy)
                {
                    tunnelType = TunnelType_Value.TUNNELTYPE_UDPFECL;
                }
                channelListDic.Add(tunnelType, list);

                rdpedycServer.SoftSyncNegotiate(waitTime, channelListDic);
            }
            return(this.rdpegfxAdapter.CreateEGFXDvc(rdpedycServer, transportType, channelId));
        }
Example #2
0
        /// <summary>
        /// Initialize this protocol with create control and data channels.
        /// </summary>
        /// <param name="rdpedycServer">RDPEDYC Server instance</param>
        /// <param name="transportType">selected transport type for created channels</param>
        /// <returns>true if client supports this protocol; otherwise, return false.</returns>
        public bool ProtocolInitialize(RdpedycServer rdpedycServer, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_UDP_Reliable)
        {
            if (!rdpedycServer.IsMultipleTransportCreated(transportType))
            {
                rdpedycServer.CreateMultipleTransport(transportType);
            }

            this.rdpefsServer = new RdpefsServer(rdpedycServer);
            bool success = false;

            // Create RDPEFS channel
            try
            {
                uint channelId = DynamicVirtualChannel.NewChannelId();
                Dictionary <TunnelType_Value, List <uint> > channelListDic = new Dictionary <TunnelType_Value, List <uint> >();
                List <uint> list = new List <uint>();
                list.Add(channelId);
                channelListDic.Add(TunnelType_Value.TUNNELTYPE_UDPFECR, list);
                rdpedycServer.SoftSyncNegotiate(waitTime, channelListDic);

                success = rdpefsServer.CreateRdpefsDvc(waitTime, channelId);
            }
            catch (Exception e)
            {
                Site.Log.Add(LogEntryKind.Comment, "Exception occurred when creating RDPEFS channels: {1}", e.Message);
            }

            return(success);
        }
        /// <summary>
        /// Initialize this protocol with create control and data channels.
        /// </summary>
        /// <param name="rdpedycserver">RDPEDYC Server instance</param>
        /// <param name="transportType">selected transport type for created channels</param>
        /// <returns>true if client supports this protocol; otherwise, return false.</returns>
        public bool ProtocolInitialize(RdpedycServer rdpedycServer, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_TCP)
        {
            if (!rdpedycServer.IsMultipleTransportCreated(transportType))
            {
                rdpedycServer.CreateMultipleTransport(transportType);
            }
            this.rdpedispServer = new RdpedispServer(rdpedycServer);
            bool success = false;

            try
            {
                success = rdpedispServer.CreateRdpedispDvc(waitTime, transportType);
            }
            catch (Exception e)
            {
                Site.Log.Add(LogEntryKind.Comment, "Exception occurred when creating RDPEDISP channels: {1}", e.Message);
            }
            return(success);
        }