nano icon indicating copy to clipboard operation
nano copied to clipboard

rpc没有返回

Open rezonegames opened this issue 2 years ago • 3 comments

rpc的实现相当于notify

func (a *agent) RPC(route string, v interface{}) error { if a.status() == statusClosed { return ErrBrokenPipe } data, err := message.Serialize(v) if err != nil { return err } msg := &message.Message{ Type: message.Notify, Route: route, Data: data, } a.rpcHandler(a.session, msg, true) return nil }

希望返回interface, err := a.rpcHandler(a.session, msg, true), 这个interface可以转成需要的类型,不知道大家怎么处理的??

rezonegames avatar Jan 06 '23 12:01 rezonegames

+1

cute-angelia avatar Apr 14 '23 02:04 cute-angelia

讨论无果,好像故意做成这样的

RockyF avatar May 30 '23 02:05 RockyF

我实现了一个版本,不过改的地方比较多,服务加载,remote和local都要处理

rezonegames avatar May 30 '23 07:05 rezonegames