Jump to content
Welcome to our new Citrix community!
  • 0

How can my application communicate to the localhost of the client machine


Bejoy Sahadevan

Question

5 answers to this question

Recommended Posts

  • 0

What protocol? What are the endpoints?

 

Most VDA-to-client communications are facilitated through Virtual Channels. If you need access to a client device, then Citrix has channels (e.g. USB Mapping) that you can use. Otherwise, you might have to develop something custom.

 

There's Local App Access to let a local app appear in a remote session, but there's no communication between the remote session and the local app.

Link to comment
  • 0

 

14 hours ago, Carl Stalhood1709151912 said:

What protocol? What are the endpoints?

 

Most VDA-to-client communications are facilitated through Virtual Channels. If you need access to a client device, then Citrix has channels (e.g. USB Mapping) that you can use. Otherwise, you might have to develop something custom.

 

There's Local App Access to let a local app appear in a remote session, but there's no communication between the remote session and the local app.

Sorry a newbie here.

 

The local machine (where citrix receiver is running) has a server running (127.0.0.1). The app running in the citrix receiver should be able to connect to this server (localhost).

 

I am using TCPClient in C# to connect to the server. Each time I try launch the app through citrix receiver, the localhost is searched in the citrix server and not in the local machine (even if I use ip address or machine name of the local machine). 

 

This architecture works perfectly if I run the app outside of the Citrix (i.e. running the app directly without the citrix receiver). 

 

So if I want to connect to this server in the local machine by an app running in the Citrix receiver.

 

Is Virtual Channel the right way to go? Is there something else? Is there any example?

Link to comment
  • 0

The app is running on one machine (VDA) trying to access 127.0.0.1 on a different machine (endpoint). That's not possible unless you have some sort of proxy to forward the connection between the two machines. You can write a Receiver virtual channel to do this. Unless a third party vendor has already done it.

 

Another option is to leave the app on the endpoint machine, and then use Local App Access to make the app look like it's running on the VDA machine.

Link to comment
  • 0

I've been looking at the same issue, how to make a server-side application communicate with a client-side application, where the client-side application is listening for requests on 127.0.0.1:TCPPORT, [for example, on 127.0.0.1:10001]

 

As suggested by Carl, I configured the client-side [endpoint] app  as a 'Local Access App' and published it via a Citrix desktop. The client-side app runs OK but any attempt by the server-side app to communicate with the TCP port fails, as the server-side app is attempting to open the TCP port on the server-side (ie to it's own 127.0.0.1:10001).

 

So maybe a custom Virtual Channel is the only way to do this. Unfortunately there's not much evidence to suggest anyone has.

 

Link to comment
  • 0

A quite old post but we did a similar scenario for our Customer and I would like like to share a few tips.

 

Local App Access feature cannot communicate between Citrix Workspace (Receiver) and  VDA as Carl mentioned. Custom Virtual Channel development is needed. 


In our scenario, we wanted to send audio from workstation to the backend without sending all traffic through VDA. We had to install a client on VDA but part of our application needed to listen on localhost on workstation only. How we solved it.


1. We used the Virtual Channel SDK to create EXE that was installed on VDA and DLL that is loaded by Citrix Workspace (Receiver). SDK contains example how to create client (DLL) and a server application (EXE). There is a documentation as well.

2. The EXE is a TCP Server implementation in C language that receive all TCP connections from our client (VDA) and send them through the virtual channel to the Citrix Workspace (Receiver).

3. The DLL receives all traffic from our TCP Server (EXE) through the virtual channel and send them to the localhost:<port> on the workstation. All responses from localhost:<port> is sent back through the virtual channel to the TCP Server (EXE) and then the TCP Server send traffic to the client installed on VDA.

 

The key is to learn how to develop DLL and EXE by Virtual Channel SDK. The best way to to it is to analyse all examples very deeply with documentation to SDK.

 

I hope that I helped. 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...