/// <summary> /// Constructor /// </summary> /// <param name="context"></param> public Rdpbcgr_DVCClientTransport(RdpbcgrClientContext context) { this.context = context; if (context.SVCManager == null) { throw new NotSupportedException("Cannot get SVC from RDPBCGR connection for RDPEDYC, this transport must be created after RDPBCGR connection established."); } channel = context.SVCManager.GetChannelByName(StaticVirtualChannelName.RDPEDYC); if (channel == null) { throw new NotSupportedException("Cannot get SVC from RDPBCGR connection for RDPEDYC, the static virtual channel is not created."); } channel.Received += ReceivedBytes; if (!context.SVCManager.IsRunning) { // Must start the SVC manager here, so as to make sure the first packet of RDPEDYC can be processed context.SVCManager.Start(); } decoder = new ClientDecodingPduBuilder(); pduBuilder = new PduBuilder(); }
/// <summary> /// Construcotr /// </summary> /// <param name="clientSessionContext"></param> /// <param name="transportType"></param> public Rdpemt_DVCClientTransport(RdpbcgrClientContext clientSessionContext, DynamicVC_TransportType transportType) { this.clientSessionContext = clientSessionContext; this.transportProtocol = Multitransport_Protocol_value.INITITATE_REQUEST_PROTOCOL_UDPFECR; if (transportType == DynamicVC_TransportType.RDP_UDP_Lossy) { this.transportProtocol = Multitransport_Protocol_value.INITITATE_REQUEST_PROTOCOL_UDPFECL; } decoder = new ClientDecodingPduBuilder(); pduBuilder = new PduBuilder(); }
/// <summary> /// Construcotr /// </summary> /// <param name="clientSessionContext"></param> /// <param name="transportType"></param> public Rdpemt_DVCClientTransport(RdpbcgrClientContext clientSessionContext, DynamicVC_TransportType transportType) { this.clientSessionContext = clientSessionContext; this.transportProtocol = Multitransport_Protocol_value.INITITATE_REQUEST_PROTOCOL_UDPFECR; if (transportType == DynamicVC_TransportType.RDP_UDP_Lossy) { this.transportProtocol = Multitransport_Protocol_value.INITITATE_REQUEST_PROTOCOL_UDPFECL; } EstablishTransportConnection(); decoder = new ClientDecodingPduBuilder(); pduBuilder = new PduBuilder(); }