Runnig on Android 11 (same error) Real Device
Runnig on Android 9 (Android Emulator) MeMu Play
Runnig on Android 9 (Android Emulator) BlueStacks 5
The origin of error is internal and unknow
It's definitely a DOTNET issue on android. Netly uses System.Net.Sockets as the basis for socket creation. This library is having internal errors in the Android device.
My suspicions:
Android Manifest needs some kind of permissions.
The compilation of System.Net.Sockets internally is not working due to some internal type of conversion (C# to C++/Java or object).
Doubts:
The problem is with the TCP server or TcpClient. What about the server that is not working (listening directly?) or the TcpClient that cannot connect to the socket? (Needs to be tested)
In case the problem is the TcpServer that cannot listen to the localhost on Android or the TcpClient that cannot connect to the localhost. How should you solve it if the problem is internal? (Do nothing?)
How to move forward? Continue writing socket using System.Net.*? or start the base in C++ and the interface in C#?
After many test i find it.
It's definitely a DOTNET issue on android. Netly uses
System.Net.Sockets
as the basis for socket creation. This library is having internal errors in the Android device.My suspicions:
System.Net.Sockets
internally is not working due to some internal type of conversion (C# to C++/Java or object).Doubts:
The problem is with the TCP server or TcpClient. What about the server that is not working (listening directly?) or the TcpClient that cannot connect to the socket? (Needs to be tested)
In case the problem is the TcpServer that cannot listen to the localhost on Android or the TcpClient that cannot connect to the localhost. How should you solve it if the problem is internal? (Do nothing?)
How to move forward? Continue writing socket using
System.Net.*
? or start the base in C++ and the interface in C#?Originally posted by @alec1o in https://github.com/alec1o/Netly/discussions/33#discussioncomment-8397518