swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

[RPC-Server] RPC Server 没有考虑粘包/拆包的情况 #180

Closed luckyhlq closed 6 years ago

luckyhlq commented 6 years ago
Q A
Bug report? yes
Feature request? no
Swoft version master
Swoole version 2.1.1
PHP version 7.0.9
Runtime environment Mac

Details

Describe what you are trying to achieve and what goes wrong. 模拟rpc client发包,tcp不保证receive一次性读取完整的包,导致rpc server解析错误

// paste output here

Provide minimal script to reproduce the issue

// paste code
stelin commented 6 years ago

这个问题已经在计划中,我们尽快修复。

huangzhhui commented 6 years ago

增加Swoole配置可解决 https://wiki.swoole.com/wiki/page/421.html https://wiki.swoole.com/wiki/page/286.html