Exemplo n.º 1
0
func (self *AetherServer) RegisterMessages(d *gnet.Dispatcher) {
	var messageMap map[string](interface{}) = map[string](interface{}){
		//put messages here
		"id01": TestMessage{}, //message id, message type
	}
	d.RegisterMessages(messageMap)
}
Exemplo n.º 2
0
func (sd *TestServiceServer) RegisterMessages(d *gnet.Dispatcher) {
	fmt.Printf("TestServiceServer: RegisterMessages \n")
	var messageMap map[string](interface{}) = map[string](interface{}){
		//put messages here
		"id01": TestMessage{}, //message id, message type
	}
	d.RegisterMessages(messageMap)
}
Exemplo n.º 3
0
func (sd *SkywireDaemon) RegisterMessages(d *gnet.Dispatcher) {
	fmt.Printf("SkywireDaemon: RegisterMessages \n")

	var messageMap map[string](interface{}) = map[string](interface{}){
		//put messages here
		"SCON": ServiceConnectMessage{}, //connect to service
	}
	d.RegisterMessages(messageMap)

}
Exemplo n.º 4
0
func (sd *DaemonService) RegisterMessages(d *gnet.Dispatcher) {
	fmt.Printf("SkywireDaemon: RegisterMessages \n")

	var messageMap map[string](interface{}) = map[string](interface{}){
		//put messages here
		"INTR": IntroductionMessage{},
		"GETP": GetPeersMessage{},
		"GIVP": GivePeersMessage{},
		"PING": PingMessage{},
		"PONG": PongMessage{},
		"SCON": ServiceConnectMessage{},
	}
	d.RegisterMessages(messageMap)
}