I’m trying to make Unity receive data over a tcp connection but I feel woefully unprepared for this task. Is there any good books or tutorials people would recommend to learn about stuff like this? I find a whole bunch of examples online, but I can’t quite make out how they did what they did.
If you’re just getting into networking, I’d recommend to start with basics. Manuals are the right place, source code is the way to go though. Thankfully Unet is mostly open source.
https://bitbucket.org/Unity-Technologies/networking/src/00db70190c0e83f9567790fd0fc60e30f4fe1c96/?at=5.6
LLAPI right now is in much better state to use, rather than HLAPI.
In any case, if you don’t want to dig deep into Unet, you can always use HLAPI examples, Cmd’s and Rpc’s for those tcp purposes (I assume you’re going to use that tcp data to do something with the game, right?).
However, that’s if you’re using Unity’s server/client setup. Otherwise you need to do everything on your own. Using LLAPI. Or external libraries.
Alternatives always are Photon, Forge, etc. If you’re willing to pay for them, they’re really easy to pick up.
That’s not what he asked for. He wants TCP messages.
I suggest looking at MSDN. The TCPListener class is probably a good starting point
Thanks, I’ve seen a lot of stuff on Servers/clients, but it’s been harder to find information about interfacing with another device over tcp. So with TCPListener, I can just listen to a particular socket and read the data directly into Unity?