class TCP
extends ConnectionWrap
import { TCP } from "https://deno.land/std@0.115.1/node/internal_binding/tcp_wrap.ts";
Constructors
new
TCP(type: number, conn?: Deno.Conn)Creates a new TCP class instance.
Methods
_onClose(): Promise<number>
Handle server closure.
bind(address: string, port: number): number
Bind to an IPv4 address.
bind6(): number
address: string,
port: number,
flags: number,
Bind to an IPv4 address.
connect(): number
Connect to an IPv4 address.
connect6(): number
Connect to an IPv6 address.
getpeername(peername: Record<string, never> | AddressInfo): number
Populates the provided object with remote address entries.
getsockname(sockname: Record<string, never> | AddressInfo): number
Populates the provided object with local address entries.
listen(backlog: number): number
Listen for new connections.
open(_fd: number): number
Opens a file descriptor.
setKeepAlive(_enable: boolean, _initialDelay: number): number
setNoDelay(_noDelay: boolean): number
deprecated
setSimultaneousAccepts(_enable: boolean)Windows only.
Deprecated by Node. REF: https://github.com/nodejs/node/blob/master/lib/net.js#L1731