package chat import ( "git.noahlan.cn/northlan/ngs/component" "git.noahlan.cn/northlan/ngs/session" ) var ( // Services is All services in chat server Services = &component.Components{} roomService = newRoomService() ) func init() { Services.Register(roomService) } func OnSessionClosed(s *session.Session) { roomService.userDisconnected(s) }