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

Is it possible to provide an API that actively switches the underlying udp connection? #25

Open
aa51513 opened this issue Mar 8, 2023 · 1 comment

Comments

@aa51513
Copy link

aa51513 commented Mar 8, 2023

The underlying transport protocol of kcp implemented by this crate is udp

I found a phenomenon during actual use:
for the same udp connection (UDP data channel determined by source IP and source port and destination IP and destination port), the speed is normal for a period of time after the connection is established,

but As the connection duration increases, the transfer speed will drop so drastically that it is almost unusable (and not blocked)

Since the connection isn't blocked and the program doesn't try to create a new connection, this puts me in a bind - can only use a very low connection speed until I restart the app, then wait for the connection speed to fail again and start a new lap

So I would like to ask, is there a way for the client to actively (after disconnection) reconnect the API?

If not, is there any other way to solve the problem I am currently facing?

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 8, 2023

I really doubt that switching the underlying UDP socket could solve your problem. Maybe the KCP session detected congestion so the speed of transmission declines. You should open trace log and see what exactly happening in the KCP session.

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

No branches or pull requests

2 participants