Terminal Server

Terminal Server qu. I have an app that runs fine on windows, and uses the UDP to communicate between computers on a network. Computers all on the same subnet.
ie 3 computers on 10.0.0.34:10122 10.0.0.45:10122 10.0.0.120:10122

Can you do this with TS? DO all the clients have the same IP or different IP addresses?
I dont have TS to test on so I really have no idea, but I get requests to make the software work on TS. Sigh…
Hamish

all users on the TS will have the same IP address.

you can simulate this on every Windows Desktop Pro version, where you may connect from another PC via RDP twice.
Just create two users with admin and remote user rights…

OK, Ill try a few things using windows 7 pro. SO if every computer on a TS setup has the same IP address then how do you communicate between them???
Can I get each client to use a different port to listen on??

You can have each user on separate ports so they can communicate. TS is not the same as VDI. VDI each user gets their own ip and “computer” but with TS you are all sharing the same computer/ip. VDI is good at keeping people separate. TS is good about sharing everything with each other.

Big difference.

If you would like I can go into (annoying levels of) detail.

sb

Ok, Got it. At present I send out a broadcast on UDP to so all the computers on the subnet can find each others ip. I uses a fixed port.There is no way to do a port broadcast.
Is there an easy way to find if your app is running within a TS instance?
I guess then if my app is in a TS instance I can keep incrementing the port number until I get a free port. then use that one?
Annoying levels of detail with TS are fine. :slight_smile:
Cheers,
Hamish

UDPSocket.write(“localhost:8888", “Hello”) will broadcast to all terminal clients

How does that work? I did a google and cant find any info on this. what port would the clients listen to? Cant only one socket be bound to port 8888 on TS?

Sorry Hamish, I was a bit in a hurry when I wrote my post.
You can write to localhost:ANYPORT to have any program at the same IP address listening to that port to communicate. I use this method on WTS to make different programs to communicate. Though you must include in your messages some info about the sender of the message, since it’s coming from the same IP address.
However this kind of local communication will not broadcast the message to other machines with different IPs.
I wrote this because from the Language Reference is not obvious you can use this trick.

Is there any way for an app to determine where it is running when in TS.
ie if there is a computer in Room A, and the user in there is Bob, and he logs into TS,
can my app find out that it’s bob running the session, and that he is using the computer in Room A??

(ps Thank you for the answers above, they have been very helpful. )

this is available via the windows environment variables

COMPUTERNAME (this is the terminal server)
CLIENTNAME (this is the remote computer)