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

Reduce latency in local TCP connection #2127

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

wh201906
Copy link
Contributor

Before PR #2022, the default communication timeout for TCP is accidentally set to 20ms, but it works for Termux.
In PR #2022, I fixed the default timeout of TCP connections, but it increases the latency when running some commands in Termux. To reduce the latency, I added some code to detect whether the host address is 127.0.0.1 or localhost, and reduce the timeout if so.

@iceman1001
Copy link
Collaborator

Great!
Maybe use strstr ?

@iceman1001 iceman1001 merged commit 8f62e80 into RfidResearchGroup:master Oct 14, 2023
12 checks passed
@wh201906
Copy link
Contributor Author

Maybe use strstr ?

That sounds better. Could you help me to modify that?

@wh201906 wh201906 deleted the local_tcp_timeout branch October 14, 2023 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants