Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Failed to send pong message

Discussion in 'Unity Transport' started by Farshadfarzan368, Jan 9, 2024.

  1. Farshadfarzan368

    Farshadfarzan368

    Joined:
    Sep 10, 2022
    Posts:
    73
    Failed to send pong message
    I have about two hundred online users and I encounter this error, what is the cause, what is the way to prevent this?
     
  2. Farshadmo368

    Farshadmo368

    Joined:
    Sep 26, 2023
    Posts:
    2
    Code (CSharp):
    1.   void InitializeServer()
    2.   {
    3.       var NetWorkSetting = new NetworkSettings();
    4.       NetWorkSetting.WithBaselibNetworkInterfaceParameters
    5.           (
    6.            receiveQueueCapacity: 1024,
    7.            sendQueueCapacity: 1024);
    8.       NetWorkSetting.WithFragmentationStageParameters(1000000);
    9.  
    10.       m_serverDrive = NetworkDriver.Create(NetWorkSetting);
    11.  
    12.       _reliblePipeline = m_serverDrive.CreatePipeline(typeof(ReliableSequencedPipelineStage));
    13.       _fragmentedPipeline = m_serverDrive.CreatePipeline(typeof(FragmentationPipelineStage), typeof(ReliableSequencedPipelineStage));
    14.  
    15.       var addr = NetworkEndPoint.AnyIpv4;
    16.       addr.Port = serverData.ServerPort;
    17.       if (m_serverDrive.Bind(addr) != 0)
    18.       {
    19.           print("filue bind");
    20.       }
    21.       else
    22.       {
    23.           print("server start");
    24.           m_serverDrive.Listen();
    25.       }
    26.       m_connecsions = new NativeList<NetworkConnection>(serverData.ccu, Allocator.Persistent);
    27.   }
    28.