Search Unity

(Solved) LLAPI - Incoming buffer message queue size capped at 1024?

Discussion in 'Multiplayer' started by HiddenMonk, Jul 13, 2017.

  1. HiddenMonk

    HiddenMonk

    Joined:
    Dec 19, 2014
    Posts:
    987
    Edit - Found the way to increase it. Didnt know about GlobalConfig
    Code (CSharp):
    1. GlobalConfig gc = new GlobalConfig();
    2. gc.ReactorMaximumReceivedMessages = 2000;
    3. NetworkTransport.Init(gc);
    ------------

    I was just messing around with the LLAPI to see how things work, and I wondered what would happen if I didnt call NetworkTransport.Receive while a connection was sending messages.
    What I noticed was that NetworkTransport.GetIncomingMessageQueueSize was being capped at 1024 while the NetworkTransport.GetIncomingPacketCount was still going up. I assume in the backend there is a pool of byte arrays with the size of ConnectionConfig.PacketSize, but I do not see a way to increase the pool size from 1024 to higher.
    Wouldnt a limit of 1024 messages cause packet loss if someone was making a MMO or something?
    I am not making an MMO, so this doesnt really concern me, but I was just curious since I am currently learning about c# sockets to potentially make my own LLAPI and was wondering about how to handle receiving packet buffering.
    I tried increasing the maxConnections, having multiple people connected, increasing ConnectionConfig.InitialBandwidth and UdpSocketReceiveBufferMaxSize, but nothing seemed to change the 1024 cap.
     
    Last edited: Jul 14, 2017