Check if a Buffer is a DTLS message. Used for demultiplex packets that are arriving on the same port. Follows RFC7983.
const dgram = require('dgram')
const is_dtls = require('is-dtls')
const socket = dgram.createSocket('udp4')
socket.on('message', (packet) => {
if (is_dtls(packet)) {
// handle DTLS...
}
})
socket.bind(0)
is-stun
- Check if a Buffer is a STUN message.is-turn
- Check if a Buffer is a TURN message.is-rtp
- Check if a Buffer is a RTP/RTCP message.
MIT, 2017 (c) Dmitry Tsvettsikh