telehash-telesocket

0.0.3 • Public • Published

telesocket

Adding telesocket support to telehash-js

Usage

var self = new require("telehash-js").switch();
require("telehash-telesocket").install(self);

//   - to listen pass path-only uri "/foo/bar", fires callback(socket) on any incoming matching uri
self.socket("/foo/bar", callback);

//   - to connect, pass in full uri "ts://hashname/path" returns socket with .onopen, .onmessage, .onerror, and .send("str")
self.socket("ts://hashname/path");

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    2
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i telehash-telesocket

Weekly Downloads

2

Version

0.0.3

License

MIT

Last publish

Collaborators

  • quartzjer