Stop stops the server (停止服务)
()
| 458 | |
| 459 | // Stop stops the server (停止服务) |
| 460 | func (s *Server) Stop() { |
| 461 | zlog.Ins().InfoF("[STOP] Zinx server , name %s", s.Name) |
| 462 | |
| 463 | // Clear other connection information or other information that needs to be cleaned up |
| 464 | // (将其他需要清理的连接信息或者其他信息 也要一并停止或者清理) |
| 465 | s.ConnMgr.ClearConn() |
| 466 | close(s.exitChan) |
| 467 | } |
| 468 | |
| 469 | // Serve runs the server (运行服务) |
| 470 | func (s *Server) Serve() { |