-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Hi,
I’ve been exploring ways to integrate custom channels into xrdp, and I came across your xrdpapi virtual channel implementation. I built a custom static channel using FreeRDP’s client, and so far everything is working as expected (read, write, open, close).
However, I noticed that when I disconnect from a session, my custom channel isn’t being closed properly. As a result, when I reconnect to the same session, the channel being used is still the old one rather than a new instance. To get this working properly, I need to reopen the channel.
Microsoft's official RDP documentation suggests using WTSQuerySessionInformationA (https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtsquerysessioninformation…) to get the connection's state. At a first glance the process I use to manage the channel could just call this function to get the connection's state, closing the channel if the state isn't active and opening it when it becomes active again. However xrdpapi only implements WTSVirtualChannelQuery.
Additionally, other channels, such as devredir or sound, have associated init() and deinit() functions in chansrv, which are called when the client connects / disconnects respectively. However, there doesn't seem to be a mechanism in place for externally managed channels.
Do you have any suggestions on how to approach this problem?
Thanks.