Can unity connect to a plain tcp/ip service

I have a tcp server that constantly sends objects positions based on physics running on the server side. I used it for a flash game I developed.
I want to reuse the same server from unity.

Is it possible?

Thanks
Eli

Yes. You’ll just need to write a plugin, which requires Unity Pro.

you don’t need to create an IP

System.Net framework from .net is all about sockets

Thanks,

I understand, but as far as I understand, this type of solution will not work in web deployment. Is there anything else?
What if I can transform my server to run as an http service, will it make it possible?

Thanks
Eli

You’re right. I did this once using .NET sockets, I don’t know what I was thinking.

What do you mean by “I don’t know what I was thinking”? is it a “stupid” solution? Am I on the wrong track.

Basically what I have is a physics engine running a simulation and I want it to send the simulation positions/rotations to a unity client.
Seems to me like a trivial task. Am I missing something?

I don’t know what you are asking, it was in reference to my first post. You have .NET sockets available to you to do what you need, which Dreamora pointed out. You are not missing anything, just make Unity open a listening socket and send updates to it and read those updates to update the presentation of the simulation.

thanks dreamora and JRavey for the answers. I’m sorry but I’m confused.
Do I need a plugin and hence unity pro or don’t I? dreamora said “you don’t need to create an IP”, I you meant “you don’t need to create a pluging”?

I might have not said this but I need it to run in the browser. Can unity run c# in the browser?

No plugin is needed if you use .NET sockets. If you have existing code you wish to leverage, then you do need to make it into a plugin.

Unity will run C# in the browser, yes. It doesn’t really care what you use, but you cannot use plugins for the browser build target. So you would have to use .NET sockets which are available in Unity (the free one).