Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

LLAPI: NetworkTransport.Receive method - no way to recover from malformed packet?

Discussion in 'Multiplayer' started by vspin, Apr 30, 2017.

  1. vspin

    vspin

    Joined:
    Mar 29, 2014
    Posts:
    22
  2. NongBenz

    NongBenz

    Joined:
    Sep 30, 2014
    Posts:
    26
    Wow, I hope we can get an answer to this. This actually might be what's bringing down my servers after a couple days too. It wouldn't even have to be malicious intent, correct? Could it just be network errors that would mangle the data / length.
     
  3. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    reeivedLength will return actual size of the message, allocate buffer with this receivedLenfth size and call Receive again...
     
    vspin and TwoTen like this.
  4. vspin

    vspin

    Joined:
    Mar 29, 2014
    Posts:
    22
    Thanks. I'll try that.