Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc没有返回 #95

Open
rezonegames opened this issue Jan 6, 2023 · 3 comments
Open

rpc没有返回 #95

rezonegames opened this issue Jan 6, 2023 · 3 comments

Comments

@rezonegames
Copy link

rezonegames commented Jan 6, 2023

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可以转成需要的类型,不知道大家怎么处理的??

@cute-angelia
Copy link
Contributor

+1

@RockyF
Copy link

RockyF commented May 30, 2023

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

@rezonegames
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants