node-stream-spliter

0.0.1 • Public • Published

StreamSpliter is for split message streams and emit discreate messages event. There are two types of StreamSpliters, as the follow:

Message has length send in its first bytes.

Message

对于按行分割的输入流,如果使用 emit 行到达事件的方式当然是非常的简单,但是如果想按照 obj.readLine(s) 的方式读就比较困难。 因为可能那时还没有行到达,最好的实现方式其实是阻塞方式,当没有行时,就等待,直到有了新行为止。

当然,行分割器可能会提示新的消息到达,然后

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    1

Package Sidebar

Install

npm i node-stream-spliter

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • kaven276