Communicate with external c# application

Hello,

I´m trying to connect to an c# application over tcp and communicate with it. For my Unity application I used C# as well. I tried it with the TCPClient-class and NetworkStream and recognized that my game is stuck after running this script.

Unfortunately the network class of Unity is only usable between Unity applications.

Does anyone know a possibility to connect and communicate with an external c# application?

Any idea or hint can be helpful.
Thank you in advance.

As I understand it, there’s one of two things you could be trying to do: connect to an application on a remote server, or connect to an application on the same machine using sockets.

If you’re trying to connect to a remote service, you should look at the WWW class: Unity - Scripting API: WWW

If you want to connect to a socket on the same machine, there are a number of posts discussing this already. Try Unity3D and Sockets - C# - Questions & Answers - Unity Discussions

You can also look at community-built solutions like UniWeb: