Home  >  Article  >  Backend Development  >  php socket怎么连续接收多个tcp包

php socket怎么连续接收多个tcp包

WBOY
WBOYOriginal
2016-06-13 10:52:091105browse

php socket如何连续接收多个tcp包
php socket如何连续接收多个tcp包

------解决方案--------------------
你一次读16个字节,4次供64个字节。这只是一个tcp包的内容,哪来的4个包?

tcp 在传输前会等待后续数据数据直到缓冲区慢或数据结束,然后才发送

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn