/// <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.rdpegtServer = new RdpegtServer(rdpedycServer);
bool success = false;
// Create RDPEGT Channel
try
{
success = rdpegtServer.CreateRdpegtDvc(waitTime);
}
catch (Exception e)
{
Site.Log.Add(LogEntryKind.Comment, "Exception occurred when creating RDPEGT channels: {1}", e.Message);
}
return success;
}