Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Mono Upgrade DotNetty UDP problem.

Discussion in 'Experimental Scripting Previews' started by Seto, Feb 29, 2020.

  1. Seto

    Seto

    Joined:
    Oct 10, 2010
    Posts:
    243
    The DotNetty TCP is working correctly for my previous apps.
    I tried UDP these days. And I found that it's not working correctly in Unity.

    It's working correctly in normal console app of C#. But it's not working with Unity. The DotNetty code is included with .cs files for easily debugging. The case number is 1223903.
     
  2. Seto

    Seto

    Joined:
    Oct 10, 2010
    Posts:
    243
    Code (CSharp):
    1. .Channel<SocketDatagramChannel>()
    I changed this to the code below to limit it to ipv4. It will work. Does it mean that Unity is incompatible with ipv6?
    Code (CSharp):
    1. .ChannelFactory(() => new SocketDatagramChannel(AddressFamily.InterNetwork))
     
  3. Seto

    Seto

    Joined:
    Oct 10, 2010
    Posts:
    243
    It's working correctly with the normal C# Console App. Both are run in Windows 10 x64. But the normal C# Console App is working. In Unity, it's not. So I think it's a bug of Mono from Unity.
    https://github.com/SetoKaiba/ConsoleApplication1
    Here's the code and the binary in ConsoleApplication1\bin\Debug\ConsoleApplication1.exe. Run and wait. You will see that the error won't occur with normal C# Console App. So it's absolutely a bug of Unity.