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