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