Search Unity

MLAPI Client-Server Timeout on running session for unstable connections

Discussion in 'Netcode for GameObjects' started by aivo, Aug 5, 2021.

  1. aivo

    aivo

    Joined:
    Feb 13, 2017
    Posts:
    30
    Hello

    I wonder if there is a setting that allows me to specify a time for a maximum timeout on my network connection?

    So we're running multiple clients on a local network, whereas the clients are on WiFi. In some areas we have quite unstable connections so the connection might drop out.
    Though the clients are perfeclty capable to run on their own without a server for a couple of seconds.

    My test scenarion would be:
    - Connect the client to the server
    - manually disable the WiFi connection
    - client stays alive.. OS automatically tries to reconnect
    - manually reenable the WiFi connection
    - everything is still fine :)


    from what I see ClientConnectionBufferTimeout only has effect on the ConnecitonApproval.

    Am I missing something?
     
  2. aivo

    aivo

    Joined:
    Feb 13, 2017
    Posts:
    30
    in the meantime...

    ... my solution was to modify MLAPI's UNetTransport's GetConfig() method. There you could changed the
    connectionConfig.DisconnectTimout to my desided value.

    I guess it would be nice to expose this value by default.
     
    AnKOu likes this.