Wraps Node.js net.Server in an observable with RxJS 5.
Install with npm install --save node-rx-server
.
Exports two functions: observableFromStream
and createRxServer
.
- Creates an Observable from a Node.js Stream
- Maps event
data
toobserver.next
,error
toobserver.error
, andend
toobserver.complete
- Observable is multicasted and hot (via
.share()
)
- Wraps Node.js net.Server in an Observable
- Each connection will emit a new Observable which yields
{socket, buffer}
- Observable is multicasted and hot (via
.share()
)
Please see src/debug.ts
for simple, working examples of both functions.
This package uses RxJS 5.0, which (at the time of this writing) is still in beta.
If you are using RxJS 4.0, check out rx-node.
Feedback or contributions: please feel free to open an issue or PR!
PDDL-1.0 (Public Domain)