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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to run more than 16 NetworkClients?

Discussion in 'Multiplayer' started by Femidko, Oct 26, 2016.

  1. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    55
    I'm writing client for test a server. I want to simulate a large number of client connections . However, an error appears when I create more than 16 NetworkClient: "maximum hosts cannot exceed {16}" . Can I create more than 16 NetworkClient? How to do it?
     
    Last edited: Oct 26, 2016
  2. tungchengvn

    tungchengvn

    Joined:
    Sep 30, 2014
    Posts:
    13
    I got that problem too. Cannot connect more than 16 NetworkClient per .exe standalone instance. The best I can do now is run many .exe instance with 16 NetworkClient each.
     
  3. Femidko

    Femidko

    Joined:
    Aug 4, 2013
    Posts:
    55
    Thank you for your reply. But clients are periodically disconnected from the server and re-reconnected. And again there is the same error
     
  4. tungchengvn

    tungchengvn

    Joined:
    Sep 30, 2014
    Posts:
    13
    Increase DisconnectTimeout from both Server/Client's ConnectionConfig. My DisconnectTimeout is 10000 ms (default is 2000 ms). My client also send an empty "Ping" message each second. Hope it help in your case.