Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets problem on Android build #35

Open
alec1o opened this issue Feb 7, 2024 · 1 comment
Open

Sockets problem on Android build #35

alec1o opened this issue Feb 7, 2024 · 1 comment
Labels
Bug Something isn't working Solved Question/Ask solved.

Comments

@alec1o
Copy link
Owner

alec1o commented Feb 7, 2024

After many test i find it.

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:

  1. Android Manifest needs some kind of permissions.
  2. The compilation of System.Net.Sockets internally is not working due to some internal type of conversion (C# to C++/Java or object).

Doubts:

  1. 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)

  2. 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?)

  3. 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 #33 (comment)

alec1o added a commit that referenced this issue Feb 8, 2024
The cause of this error is because ``TCP Backlog`` by default was using ``0`` and searching ``TcpListener`` api it was using ``2147483647``. To fix it needed update default value to ``2147483647`` or diferent by zero or negative value.
@alec1o
Copy link
Owner Author

alec1o commented Feb 8, 2024

db1eda4

Backlog problem, (read more on commit description.)

@alec1o alec1o closed this as completed Feb 8, 2024
@alec1o alec1o added Bug Something isn't working Solved Question/Ask solved. labels Oct 7, 2024
@alec1o alec1o reopened this Oct 7, 2024
Repository owner locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Solved Question/Ask solved.
Projects
None yet
Development

No branches or pull requests

1 participant