You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngs/examples/cluster/chat/init.go

22 lines
355 B
Go

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)
}