dtls-client调试。
const dtls = require('node-dtls-client').dtls
let options = {
type: 'udp4',
address: '10.42.0.1',
port: 49191,
psk: {},
timeout: 1000,
cipherSuites: [
'TLS_PSK_WITH_AES_128_GCM_SHA256',
'TLS_PSK_WITH_AES_256_GCM_SHA384'
// 'TLS_PSK_WITH_3DES_EDE_CBC_SHA'
]
};
const socket = dtls.createSocket(options).on("connected", e => {
console.log("dtls testing");
const msg = new Buffer("message payload");
socket.send(msg);
})
}