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

UNet NetworkServer max connections

Discussion in 'UNet' started by hMark, Sep 4, 2015.

  1. hMark

    hMark

    Joined:
    Oct 16, 2013
    Posts:
    16
    Hello guys,

    Is it possible to change number of max. connections for NetworkServer? It looks that the default value is 8 from docs.

    When I am trying to setup it this way (e.g. with 100 connections):

    ConnectionConfig config = new ConnectionConfig();
    NetworkServer.Configure(config, 100);


    then all clients throw this error:

    UNet Client Disconnect Error: CRC Mismatch.

    Thanks for responses.
     
  2. Noob4Sale

    Noob4Sale

    Joined:
    Mar 10, 2015
    Posts:
    11
    Both the server and the client need the same configuration to be able to connect,

    Code (CSharp):
    1. void Client(){
    2. ConnectionConfig config = new ConnectionConfig();
    3. ClientLoop.NetworkClient.Configure (config, 100);
    4. }
    5. void Server(){
    6. ConnectionConfig config = new ConnectionConfig();
    7. NetworkServer.Configure (config, 100);
    8. }