jspurefix
Version:
pure node js fix engine
18 lines (15 loc) • 439 B
text/typescript
import { FixDuplex } from './fix-duplex'
import * as net from 'net'
import { inject, injectable } from 'tsyringe'
import { DITokens } from '../../runtime/di-tokens'
()
export class TcpDuplex extends FixDuplex {
constructor ((DITokens.duplexParam) public readonly socket: net.Socket) {
super()
this.readable = socket
this.writable = socket
}
end (): void {
this.socket.end()
}
}