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

请问发送的数据如何保证返回的结果相匹配? #34

Open
YuetTusi opened this issue Aug 12, 2019 · 2 comments
Open

请问发送的数据如何保证返回的结果相匹配? #34

YuetTusi opened this issue Aug 12, 2019 · 2 comments

Comments

@YuetTusi
Copy link

假设使用hprose发送两个请求,第一个耗时较长,返回的第一个结果并不是客户端第一个请求的结果,这种情况下如何能保证请求与响应结果一一对应?

全双工套接字(Socket)绑定这个文档中,客户端发送的数据有 4 个字节表示请求的唯一标识(id),但追到源码中好像数据并没有这个id头。

请问有什么解决方案么?谢谢

@andot
Copy link
Member

andot commented Aug 13, 2019

代码里面有的。

@andot
Copy link
Member

andot commented Aug 13, 2019

3.0 的 Socket 绑定还增加了 crc 校验,你上面发的这个文档是 1.0~2.0 的。你用 typescript 版本就不需要看这个了。typescript 版本是 hprose 3.0 实现。

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