is-turn

2.0.0 • Public • Published

is-turn

Build Status npm node license downloads

Check if a Buffer is a TURN message. Used for demultiplex packets that are arriving on the same port. Follows RFC7983.

Usage

const dgram = require('dgram')
const is_turn = require('is-turn')
 
const socket = dgram.createSocket('udp4')
 
socket.on('message', (packet) => {
  if (is_turn(packet)) {
    // handle TURN...
  }
})
 
socket.bind(0)

Related projects

License

MIT, 2017 (c) Dmitry Tsvettsikh

Package Sidebar

Install

npm i is-turn

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • reklatsmasters