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

如何获取对端地址 #77

Open
samuelyao314 opened this issue Jan 23, 2021 · 1 comment
Open

如何获取对端地址 #77

samuelyao314 opened this issue Jan 23, 2021 · 1 comment

Comments

@samuelyao314
Copy link

tcp 服务器, 通过Session , 如何能够获取对端地址 ? 代码看了下, 感觉封装层次太深了, 没法直接获取 net.Conn, 然后调用 conn.RemoteAddr()

@zwczou
Copy link

zwczou commented Aug 10, 2021

目前只能自己实现Codec,然后在Codec保存net.Conn, 通过 session.Codec().Conn().RemoteAddr()

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