UNPKG

nsyslog

Version:

Modular new generation log agent. Reads, transform, aggregate, correlate and send logs from sources to destinations

24 lines (18 loc) 393 B
const dgram = require('dgram'); class UDPClient { constructor(host,port) { this.client = dgram.createSocket("udp4"); this.host = host; this.port = port; } connect(callback) { callback(); } close(callback) { callback(); } send(msg, callback) { this.client.send(msg, 0, msg.length, this.port, this.host, callback); } } module.exports = UDPClient;