Nohsib
Nohsib

Reputation: 3722

TCP client for Unity

How to write a TCP client in Unity3d which reads data constantly from a server socket and prints to the console or updates on some text boxes?

Upvotes: 6

Views: 16418

Answers (2)

Calvin
Calvin

Reputation: 4195

This could be a good starting point:

http://answers.unity3d.com/questions/15422/unity-project-and-3rd-party-apps.html

Upvotes: 0

Flamy
Flamy

Reputation: 313

Creating a TCP client in unity3d is nearly the same as developing it in c#, you can use almost all the classes of .net (4.0 as of the latest unity 3.5), still before you use a class look for the support in mono from this page.

If the class is not supported in mono, just drag the respected dll corresponding to the class from the .net library. Also you have two methods to do it, write the whole logic using .net classes in unity. or make a dll of it and import it into unity and use that dll for processing TCP works. In terms of performance there is no difference, all depends on ur preference.

Upvotes: 2

Related Questions