Search Unity

Disabling Nagle's Algorithm through System.Net.ServicePointManager

Discussion in 'Multiplayer' started by CreatorEv, Aug 5, 2019.

  1. CreatorEv

    CreatorEv

    Joined:
    Apr 2, 2017
    Posts:
    11
    Hi all,

    I have been having issues disabling Nagle's Algorithm through System.Net.ServicePointManager while using ClientWebSocket class within Unity (c#).

    Using the same code in a Visual Studio project successfully disables the Nagle's Algorithm with ServicePointManager.UseNagleAlgorithm = false.

    Is it possible that Unity can be interfering?

    Thanks

    Evan
     
  2. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    How did you determine that the Nagle was not turned off after setting the flag to false? did you analyze the traffic?
    I am asking because I seem to recall similar issue I had years ago in Unity (I needed to turn the Nagle off) and it seemed to have worked at the time.
     
  3. CreatorEv

    CreatorEv

    Joined:
    Apr 2, 2017
    Posts:
    11
    By looking at the packets being sent through Wireshark and observing the output on the server side.

    Thanks for the reply.

    Evan
     
  4. CreatorEv

    CreatorEv

    Joined:
    Apr 2, 2017
    Posts:
    11
    Also, did you use the same method as explained above to turn Nagle off?
     
  5. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    154
    Good question. I wish I could remember lol
    It was several years ago. I'll take a look and see if I can find the project I was working on.