uci-socket/test/sockets/tcpsocket-default.mjs

17 lines
337 B
JavaScript

import { Socket } from '../../src'
import process from './tcp-process'
let socket = new Socket({name:'tcp socket', log:false})
socket.registerPacketProcessor(process)
socket.packet.port = socket.listen_opts.port
;
(async () => {
await socket.create()
})().catch(err => {
console.error('FATAL: UNABLE TO START SYSTEM!\n',err)
})