seaport-stream
v0.0.1
Published
Create streams over seaport
Readme
seaport-stream 
Create streams over seaport
Basically seaport but allows you to get streams and service streams rather then mess with the details of the IO protocol
Example Client
var seaport = require("seaport-stream")
var ports = seaport.connect("localhost", 9093)
var stream = ports.get("[email protected]")
stream.on("data", function (data) {
console.log("[CLIENT]", data.toString())
})
stream.write("hello from client!")Example Server
var seaport = require("seaport-stream")
var ports = seaport.connect("localhost", 9093)
ports.service("[email protected]", handleStream)
function handleStream(stream) {
stream.write("hello from magic!")
stream.on("data", function (data) {
console.log("[MAGIC]", data.toString())
})
}Installation
npm install seaport-stream
Contributors
- Raynos
