Type aliases
LookupFunction
LookupFunction: function
Type declaration
-
- (hostname: string, options: LookupOneOptions, callback: function): void
-
Parameters
-
hostname: string
-
options: LookupOneOptions
-
callback: function
-
- (err: ErrnoException | null, address: string, family: number): void
-
Parameters
-
err: ErrnoException | null
-
address: string
-
family: number
Returns void
Returns void
NetConnectOpts
SocketConnectOpts
Functions
connect
- connect(options: NetConnectOpts, connectionListener?: function): Socket
- connect(port: number, host?: string, connectionListener?: function): Socket
- connect(path: string, connectionListener?: function): Socket
-
Parameters
-
-
Optional connectionListener: function
-
Parameters
-
port: number
-
Optional host: string
-
Optional connectionListener: function
-
Parameters
-
path: string
-
Optional connectionListener: function
createConnection
- createConnection(options: NetConnectOpts, connectionListener?: function): Socket
- createConnection(port: number, host?: string, connectionListener?: function): Socket
- createConnection(path: string, connectionListener?: function): Socket
-
Parameters
-
-
Optional connectionListener: function
-
Parameters
-
port: number
-
Optional host: string
-
Optional connectionListener: function
-
Parameters
-
path: string
-
Optional connectionListener: function
createServer
- createServer(connectionListener?: function): Server
- createServer(options?: object, connectionListener?: function): Server
-
Parameters
-
Optional connectionListener: function
-
Parameters
-
Optional options: object
-
Optional allowHalfOpen?: boolean
-
Optional pauseOnConnect?: boolean
-
Optional connectionListener: function
isIP
- isIP(input: string): number
-
Parameters
Returns number
isIPv4
- isIPv4(input: string): boolean
-
Parameters
Returns boolean
isIPv6
- isIPv6(input: string): boolean
-
Parameters
Returns boolean