method Server.prototype.on
Overload 1
#Server.prototype.on(event: string,listener: (...args: any[]) => void,): this
Overload 2
#Server.prototype.on(event: "close",listener: () => void,): this
Overload 3
Overload 4
#Server.prototype.on(event: "error",listener: (err: Error) => void,): this
Overload 5
#Server.prototype.on(event: "listening",listener: () => void,): this
Overload 6
#Server.prototype.on(event: "checkContinue",listener: RequestListener<Request, Response>,): this
Parameters #
#event: "checkContinue"
#listener: RequestListener<Request, Response>
Return Type #
this
Overload 7
#Server.prototype.on(event: "checkExpectation",listener: RequestListener<Request, Response>,): this
Parameters #
#event: "checkExpectation"
#listener: RequestListener<Request, Response>
Return Type #
this
Overload 8
#Server.prototype.on(event: "clientError",listener: (err: Error,socket: stream.Duplex,) => void,): this
Overload 9
#Server.prototype.on(event: "connect",listener: (req: InstanceType<Request>,socket: stream.Duplex,head: Buffer,) => void,): this
Overload 10
#Server.prototype.on(event: "dropRequest",listener: (req: InstanceType<Request>,socket: stream.Duplex,) => void,): this
Overload 11
#Server.prototype.on(event: "request",listener: RequestListener<Request, Response>,): this
Parameters #
#event: "request"
#listener: RequestListener<Request, Response>
Return Type #
this