Search Unity

Can "NetworkTransport.SendQueuedMessages" effectively be used to replace UNET's ChannelBuffer?

Discussion in 'UNet' started by PhilSA, Sep 18, 2017.

  1. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    SendQueuedMessages:
    https://docs.unity3d.com/ScriptReference/Networking.NetworkTransport.QueueMessageForSending.html
    https://docs.unity3d.com/ScriptReference/Networking.NetworkTransport.SendQueuedMessages.html
    UNET ChannelBuffer:
    https://bitbucket.org/Unity-Technol...Buffer.cs?at=5.3&fileviewer=file-view-default

    I've begun working on my own networking system built on the LLAPI, and while studying the HLAPI and the NetworkTransport, I noticed that NetworkTransport.SendQueuedMessages might make my life easier.

    From what I understand, UNET's ChannelBuffer's purpose is to accumulate messages in a queue for sending, and make sure to still preserve messages in its queue if the NetworkTransport happens to be full and returns an error.

    Does the Queued messages feature of networkTransport serve the same purpose? Will it keep messages in the queue if we call SendQueuedMessages and the NetworkTransport is full? (and depending on the QoS type, of course)

    I know I've read a dev post somewhere on these forums saying that the HLAPI and LLAPI actually ended up having some duplicate functionality because they were developed in parallel. The SendQueued methods aren't used anywhere in the HLAPI, so I was wondering if it might be the case here

    @aabramychev
     
    Last edited: Sep 18, 2017