Dynamic module net

Index

Variables

Interfaces

Functions

Variables

Socket: new(options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }) => "net".NodeSocket

constructor(): NodeSocket

Returns

NodeSocket

Functions

connect(options: { allowHalfOpen?: boolean; }, connectionListener?: Function)

Parameters

  • options: { allowHalfOpen?: boolean; }
  • connectionListener?: Function optional

connect(port: number, host?: string, connectionListener?: Function)

Parameters

  • port: number
  • host?: string optional
  • connectionListener?: Function optional

connect(path: string, connectionListener?: Function)

Parameters

  • path: string
  • connectionListener?: Function optional

createConnection(options: { allowHalfOpen?: boolean; }, connectionListener?: Function)

Parameters

  • options: { allowHalfOpen?: boolean; }
  • connectionListener?: Function optional

createConnection(port: number, host?: string, connectionListener?: Function)

Parameters

  • port: number
  • host?: string optional
  • connectionListener?: Function optional

createConnection(path: string, connectionListener?: Function)

Parameters

  • path: string
  • connectionListener?: Function optional

createServer(connectionListener?: (socket: "net".NodeSocket) => void): Server

Parameters

  • connectionListener?: (socket: "net".NodeSocket) => void optional

Returns

Server

createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: "net".NodeSocket) => void): Server

Parameters

  • options?: { allowHalfOpen?: boolean; } optional
  • connectionListener?: (socket: "net".NodeSocket) => void optional

Returns

Server

isIP(input: string): number

Parameters

  • input: string

Returns

number

isIPv4(input: string): boolean

Parameters

  • input: string

Returns

boolean

isIPv6(input: string): boolean

Parameters

  • input: string

Returns

boolean