Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Networking Education

Discussion in 'Multiplayer' started by denali95, Jul 11, 2017.

  1. denali95

    denali95

    Joined:
    Nov 6, 2016
    Posts:
    78
    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.
     
  2. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    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-Technol...b70190c0e83f9567790fd0fc60e30f4fe1c96/?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.
     
  3. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    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
     
  4. denali95

    denali95

    Joined:
    Nov 6, 2016
    Posts:
    78
    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?
     
  5. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    denali95 likes this.