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

16 lines
341 B
JavaScript
Raw Normal View History

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