panjf2000 / gnet

🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go.

Home Page:https://gnet.host

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何通知GNet关闭某个链接?[Question]:

harry0059 opened this issue · comments

Actions I've taken before I'm here

  • I've thoroughly read the documentations about this problem but still have no answer.
  • I've searched the Github Issues/Discussions but didn't find any similar problems that have been solved.
  • I've searched the internet for this problem but didn't find anything helpful.

Questions with details

如何通知GNet关闭某个链接?gnet v2.3.1
场景:
一个用户开多客户端 重复链接服务器,要断开前一个链接,保持后一个链接
在收到一个后一个用户的链接数据登陆请求识别到用户id后,直接用前一个链接的gnet.Conn 的Close 关闭链接不行吧?

Code snippets (optional)

No response

直接用前一个链接的gnet.Conn 的Close 关闭链接不行吧?

为什么不行?