Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Is RPC Peer-to-peer?

Discussion in 'Multiplayer' started by yoonitee, Aug 12, 2014.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    OK say you have a unity instance set up as a server and several clients. You send an RPC message from one client to another

    RPC(string name, NetworkPlayer target, params object[] args)

    and say this was quite a lot of data. Does the data pass through the person who is acting as the server or is there a direct link between the two clients?

    I'm trying to figure out how much load is on the server. Say you wanted to pass 1Mb of data between client A and client B would the 1Mb of data pass to the server and back to client B?

    So to do direct peer-to-peer does one person have to be server?
     
  2. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    All traffic goes through the server.
     
  3. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    Thought so.

    And I suppose a player can't be a client of two different servers?
     
  4. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
  5. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    Well that would make my idea for a peer-2-peer network quite difficult then! Maybe uNet will solve this.