Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

javascript-protocol-framework

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javascript-protocol-framework

A communication protocol framework.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Javascript Protocol Framework

Build Status

A protocol is a contract between different entities on how they go about their communication. This library is a framework, built in javascript, to facilitate building such contract.

Installation

npm install javascript-protocol-framework

Example

// Server-side protocol
protocol.addReceiver('ping', function(message) {
  message.reply('pong');
});

// Client-side session
session.send({type: 'ping'}, function(message) {
  message.data === 'pong'
})

Goals

  • Allow simultaneous multi-step communication
  • Memory-efficient enough for server-side usage
  • Must work cross platform (NodeJS, browser)
  • Make business logic independend from the used transportation layer

Documentation

See the 'full' implementation of the json-tcp module for an example.

Test

To start the mocha test suite:

grunt test

Browser-testing:

zuul --local 8000 test/_test.js
zuul -- test/_test.js

License

MIT

Keywords

FAQs

Package last updated on 20 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc