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

kcp连接是怎么建立和关闭的? #7

Closed
huyuguang opened this issue Apr 28, 2017 · 3 comments
Closed

kcp连接是怎么建立和关闭的? #7

huyuguang opened this issue Apr 28, 2017 · 3 comments

Comments

@huyuguang
Copy link

看了一下代码,似乎只要用一个新的conv给对方发包,对方就直接接受了这个连接。
关闭的代码我也没看到,如果一边想要关闭kcp连接,那么它要怎么做才能通知对方让对方也关闭?
感觉像是依赖于keeplive超时?

@liudf0716
Copy link
Owner

for xkcp client side, there are no problem, causing when client close its connection, which will trigger on close event, and kcp object will be released.

for xkcp server side, u can not active close its connection which xkcp server simulated client to connect , cause u dont know when server side you connected stop to send its data. only after server-side close its connection, which will trigger close event and release its kcp object.

@huyuguang
Copy link
Author

我是说,当client端调用ikcp_release,它是怎么通知server端也调用对应conv的ikcp_release的?

@liudf0716
Copy link
Owner

Client does not notify server to close its related connection.

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