Skip to content

Instantly share code, notes, and snippets.

@peterli888
Created January 16, 2018 14:29
Show Gist options
  • Save peterli888/e80e39bc3d463e3c2bf95c51db6e6875 to your computer and use it in GitHub Desktop.
Save peterli888/e80e39bc3d463e3c2bf95c51db6e6875 to your computer and use it in GitHub Desktop.
传输的数据小于64k 或者设置的缓存大小 tcp快
数据大时,tcp一个包传不完 ,多次 socket.on('data',fn),什么时候传完了,用长度判断不行,需要在最后传一些特殊字符,造成速度慢
http似乎解决了这个问题
tcp的复用 一个socket传输多条cb的数据需要设计id来区分
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment