/// <summary> /// Create dynamic virtual channel. /// </summary> /// <param name="transportType">selected transport type for created channels</param> /// <param name="timeout">Timeout</param> /// <returns>true if client supports this protocol; otherwise, return false.</returns> public bool CreateRdpevorDvc(TimeSpan timeout, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_TCP) { const ushort priority = 0; rdpevorControlDVC = rdpedycServer.CreateChannel(timeout, priority, RdpevorControlChannelName, transportType, OnDataReceived); rdpevorDataDVC = rdpedycServer.CreateChannel(timeout, priority, RdpevorDataChannelName, transportType, OnDataReceived); if (rdpevorControlDVC != null && rdpevorDataDVC != null) { return(true); } return(false); }
/// <summary> /// Create dynamic virtual channel. /// </summary> /// <param name="transportType">selected transport type for created channels</param> /// <param name="timeout">Timeout</param> /// <returns>true if client supports this protocol; otherwise, return false.</returns> public bool CreateRdpegtDvc(TimeSpan timeout, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_TCP) { const ushort priority = 0; rdpegtDVC = rdpedycServer.CreateChannel(timeout, priority, RdpegtChannelName, transportType, null); if (rdpegtDVC != null) { return(true); } return(false); }
/// <summary> /// Create RDPEDYC channel /// </summary> /// <param name="channelName"></param> /// <returns></returns> private bool CreateEDYCChannel(string channelName) { try { if (rdpedycServer == null) { return(false); } rdpedycServer.CreateChannel(timeout, 0, channelName, DynamicVC_TransportType.RDP_TCP); return(true); } catch { return(false); } }
/// <summary> /// Create dynamic virtual channel. /// </summary> /// <param name="transportType">selected transport type for created channels</param> /// <param name="timeout">Timeout</param> /// <returns>true if client supports this protocol; otherwise, return false.</returns> public bool CreateRdpegfxDvc(TimeSpan timeout, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_TCP) { const ushort priority = 0; try { rdpegfxDVC = rdpedycServer.CreateChannel(timeout, priority, RdpegfxGraphicChannelName, transportType, OnDataReceived); } catch { } if (rdpegfxDVC != null) { return(true); } return(false); }
/// <summary> /// Create dynamic virtual channel. /// </summary> /// <param name="transportType">selected transport type for created channels</param> /// <param name="timeout">Timeout</param> /// <returns>DVC created</returns> public DynamicVirtualChannel CreateRdpeusbDvc(TimeSpan timeout, DynamicVC_TransportType transportType = DynamicVC_TransportType.RDP_TCP) { const ushort priority = 0; DynamicVirtualChannel channel = null; try { channel = rdpedycServer.CreateChannel(timeout, priority, RdpeusbChannelName, transportType, OnDataReceived); } catch { } if (channel != null) { rdpeusbChannelDicbyId.Add(channel.ChannelId, channel); return(channel); } return(null); }
/// <summary> /// Create efs DVC /// </summary> /// <param name="timeout">Timeout</param> /// <param name="channelId">DVC channel ID</param> /// <returns>return create results.</returns> public bool CreateRdpefsDvc(TimeSpan timeout, uint?channelId = null) { const ushort priority = 0; try { if (channelId == null) { channelId = DynamicVirtualChannel.NewChannelId(); } rdpefsDVC = rdpedycServer.CreateChannel(timeout, priority, rdpefsChannelName, DynamicVC_TransportType.RDP_UDP_Reliable, OnDataReceived, channelId); } catch { throw new InvalidOperationException("DVC createed failed."); } return(rdpefsDVC == null); }