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