interface Socket { end(): void; on(event: "error",
listener: ((e: unknown) => void)): void; on(event: "close",
listener: (() => void)): void; on(event: "data",
listener: ((data: Buffer) => void)): void; remoteAddress?: string; remotePort?: number; write(data: string): void; } Properties
Optional
remoteAddress
remoteAddress?: string
Optional
remotePort
remotePort?: number
Methods
on
- on(event, listener): void
Parameters
- event: "error"
- listener: ((e: unknown) => void)
Returns void
- on(event, listener): void
Parameters
- event: "close"
- listener: (() => void)
Returns void
- on(event, listener): void
Parameters
- event: "data"
- listener: ((data: Buffer) => void)
Returns void
write
- write(data): void
Returns void
The socket abstraction of flowR. Essentially a subset of what the default
net.Socket
ofnode
provides.