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

relay功能? #65

Closed
samuelyao314 opened this issue Jan 29, 2019 · 1 comment
Closed

relay功能? #65

samuelyao314 opened this issue Jan 29, 2019 · 1 comment

Comments

@samuelyao314
Copy link

tcp 里面支持

// 带有RPC和relay功能
type MsgHooker struct {
}

请问什么是relay? 适用于怎么样的场景?

@davyxu
Copy link
Owner

davyxu commented Jan 29, 2019

普通发消息是Send( msg )
Relay发消息就是Send(msg, context) 而context可以支持int32, int64, []int64,甚至于另外一个消息
其实就是方便网关这类应用, 需要在原有消息上带上一个上下文发到对面服务器, 对面服务器也能拿到上下文. 无需修改msg协议

relay功能暂时没文档, 只是在内部使用. 持续在完善. 后面考虑添加文档, 开放为稳定功能

@davyxu davyxu closed this as completed Feb 14, 2019
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

2 participants