is-turn
v2.0.0
Published
Check if a Buffer is a TURN message.
Downloads
19
Maintainers
Readme
is-turn
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
is-dtls
- Check if a Buffer is a DTLS message.is-stun
- Check if a Buffer is a STUN message.is-rtp
- Check if a Buffer is a RTP/RTCP message.
License
MIT, 2017 (c) Dmitry Tsvettsikh