2.3.4 • Published 9 years ago

i-peer v2.3.4

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
9 years ago

Peer

Interface

An object implements the Peer interface if it:

  • Inherits from y-emitter Target
  • Has been initialized by the y-emitter Target's constructor
  • Fires a 'msg' event when a message is received
  • Has the 'ready' state set when it can receive and send messages
  • Has the 'closed' state set when it will no longer receive and send messages
  • Has a .give('msg',msg) method for sending messages, where the acceptable type and structure of msg depends on the object itself, typically JSONable data, and what it is to be sent is a copy of msg at the time this method was called
  • Has a .set('closed') method for terminating the connection

Implementations

  • WebSocket client
peer = require('i-peer/ws')(url);
2.3.4

9 years ago

2.3.3

10 years ago

2.3.2

10 years ago

2.3.1

10 years ago

2.3.0

10 years ago

2.2.0

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago