Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "net"

Index

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

    • options: NetConnectOpts
    • Optional connectionListener: function
        • (): void
        • Returns void

    Returns Socket

  • Parameters

    • port: number
    • Optional host: string
    • Optional connectionListener: function
        • (): void
        • Returns void

    Returns Socket

  • Parameters

    • path: string
    • Optional connectionListener: function
        • (): void
        • Returns void

    Returns Socket

createConnection

  • createConnection(options: NetConnectOpts, connectionListener?: function): Socket
  • createConnection(port: number, host?: string, connectionListener?: function): Socket
  • createConnection(path: string, connectionListener?: function): Socket
  • Parameters

    • options: NetConnectOpts
    • Optional connectionListener: function
        • (): void
        • Returns void

    Returns Socket

  • Parameters

    • port: number
    • Optional host: string
    • Optional connectionListener: function
        • (): void
        • Returns void

    Returns Socket

  • Parameters

    • path: string
    • Optional connectionListener: function
        • (): void
        • Returns void

    Returns Socket

createServer

  • createServer(connectionListener?: function): Server
  • createServer(options?: object, connectionListener?: function): Server
  • Parameters

    • Optional connectionListener: function
        • Parameters

          Returns void

    Returns Server

  • Parameters

    • Optional options: object
      • Optional allowHalfOpen?: boolean
      • Optional pauseOnConnect?: boolean
    • Optional connectionListener: function
        • Parameters

          Returns void

    Returns Server

isIP

  • isIP(input: string): number
  • Parameters

    • input: string

    Returns number

isIPv4

  • isIPv4(input: string): boolean
  • Parameters

    • input: string

    Returns boolean

isIPv6

  • isIPv6(input: string): boolean
  • Parameters

    • input: string

    Returns boolean

Generated using TypeDoc