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

客户端貌似不需要知道虚拟连接id #14

Open
trist725 opened this issue Jun 2, 2020 · 0 comments
Open

客户端貌似不需要知道虚拟连接id #14

trist725 opened this issue Jun 2, 2020 · 0 comments

Comments

@trist725
Copy link

trist725 commented Jun 2, 2020

客户端和服务端应该是多对1的关系,
网关维护双方的conn对应关系,map[serverConn][]clientConn,则客户端就不必知道虚拟连接id了吧?
只需要网关和服务端的通信需要在包头加上虚拟连接id,
服务端发给网关时,网关获取虚拟连接id,然后从包头去掉该id,转发给客户端。
这样的设计,对客户端来说才是透明的。

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

1 participant