tj

turn-js

TURN (Traversal Using Relay NAT) library written entirely in JavaScript

Showing:

Popularity

Downloads/wk

15

Maintenance

No Maintenance Data Available

Package

Dependencies

8

Size (min+gzip)

49.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

CircleCI npm

Turn-JS

TURN (Traversal Using Relay NAT) library written entirely in JavaScript.

Features

  • implements (most of) the features specified in RFC 5766
  • supports TCP and UDP communication
  • offers callback and promise based API
  • can be browserified (to be used in chrome apps)

Install

npm install turn-js

Usage

Callbacks

Promises

API

myClient = turn(serverAddr, serverPort, user, pwd, transport)

myClient.allocate(function(address) {}, function(error) {})

myClient.allocateP()

myClient.createPermission(address, function() {}, function(error) {})

myClient.createPermission(address)

myClient.bindChannel(address, port, channel, lifetime, function() {}, function(error) {})

myClient.bindChannelP(address, port, channel)

myClient.refresh(lifetime, function() {}, function(error) {})

myClient.refreshP(lifetime)

myClient.close(function() {}, function(error) {})

myClient.sendToRelay(bytes, address, port, function() {}, function(error))

myClient.sendToRelayP(bytes, address, port)

myClient.sendToChannel(bytes, channel, function() {}, function(error) {})

myClient.sendToChannelP(bytes, channel)

Events

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100