示例#1
0
// Registers our Messages with gnet
func (self *MessagesConfig) Register() {
	//dont register messages twice
	if _messages_registered == true {
		return
	}
	_messages_registered = true

	for _, mc := range self.Messages {
		gnet.RegisterMessage(mc.Prefix, mc.Message)
	}
	gnet.VerifyMessages()
}
示例#2
0
// Registers our Messages with gnet
func (self *MessagesConfig) Register() {
	for _, mc := range self.Messages {
		gnet.RegisterMessage(mc.Prefix, mc.Message)
	}
	gnet.VerifyMessages()
}