Search Unity

Feedback Allow changing buffer size for BeginSend() (Unity Transport)

Discussion in 'Unity Transport' started by Kichang-Kim, Feb 25, 2020.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    Hi. I found that Unity Transport 0.3.0-p6 provides new API for sending data, NetworkDriver.BeginSend() end EndSend(), returns DataStreamWriter.

    The problem is that returned DataStreamWriter's capacity is fixed to MTU size, so I can't implement my own packet fragmentation pipeline. Previous version of Unity Transport allows specifying custom DataStreamWriter for Send().

    For patcket fragmentation, NetworkDriver.BeginSend() should accept large size packet and it should be splitted into small packets in pipeline. Only need that final output should fit maximum capacity of network interface, not Driver's input.

    Thanks.
     
  2. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
  3. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    We have a task on our backlog to specify size to begin send and make it possible to pipelines to override the max size. I do not have an exact date for when it will be available yet. Right now you would have to do the fragmentation as a layer outside the driver - which I know is not great.
     
  4. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    Thanks for reply. I'll wait for improvement of Unity Transport.
     
  5. sietse85

    sietse85

    Joined:
    Feb 22, 2019
    Posts:
    99
    Bumping this to say i need exactly the same feature. I am hoping this will be released soon :) Thanks
     
  6. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    Unity Transport 0.3.1-preview.4 is released with requiredPayloadSize parameter, but it is still restricted to NetworkParameterConstants.MTU so nothing is resolved. It is still impossible to implement custom packet fragmentation/assembling pipeline.

    Will it be supported in the future? I want to know Unity Tranport's roadmap because I'm using LLAPI currently and it will be deprecated soon so I need the replacement of it.
     
    sietse85 likes this.
  7. sietse85

    sietse85

    Joined:
    Feb 22, 2019
    Posts:
    99
    any news?
     
  8. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    transport 0.4.0 will have a fragmentation pipeline stage. We will release it soon, but I don't know exactly when it will happen yet.
     
    sietse85 and Kichang-Kim like this.