Search Unity

Will network RPC block if a client does not respond?

Discussion in 'Multiplayer' started by AmazingRuss, Oct 30, 2008.

  1. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    I'm assuming network RPC calls are reliable. If a client does not respond to an RPC call, is the server stuck until it receives a response?

    Ideally it would buffer things somehow, so that execution could continue even if a client dies completely.
     
  2. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    RPC calls are asynchronous so they wont block the server in the sense that it will stop running until the RPC is sent and received.

    They are reliable as well, and the order they are sent is the order they will be received (if received at all).

    I am not sure what happens behind the scenes when a player disconnects. But if they do not respond to the server for a period of time, they will be disconnected from the server. OnPlayerDisconnected will be called, and I would bet that the RPCs destined for that player would just disappear.