Class Server

Hierarchy

Index

Properties

Methods

Properties

public maxHeadersCount: number

Methods

public addListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public address(): { port: number; family: string; address: string; }

Returns

{ port: number; family: string; address: string; }

public close(cb?: any): Server

Parameters

  • cb?: any optional

Returns

Server

public emit(event: string, args?: Array<any>): boolean

Parameters

  • event: string
  • args?: Array<any> optional

Returns

boolean

public listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server

Parameters

  • port: number
  • hostname?: string optional
  • backlog?: number optional
  • callback?: Function optional

Returns

Server

public listen(path: string, callback?: Function): Server

Parameters

  • path: string
  • callback?: Function optional

Returns

Server

public listen(handle: any, listeningListener?: Function): Server

Parameters

  • handle: any
  • listeningListener?: Function optional

Returns

Server

public listeners(event: string): Array<Function>

Parameters

  • event: string

Returns

Array<Function>

public on(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public once(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public removeAllListeners(event?: string): EventEmitter

Parameters

  • event?: string optional

Returns

EventEmitter

public removeListener(event: string, listener: Function): EventEmitter

Parameters

  • event: string
  • listener: Function

Returns

EventEmitter

public setMaxListeners(n: number)

Parameters

  • n: number