Skip to main content

Server

class Server
extends tls.Server

Deno compatibility

The cert and key options do not support an array input.

See http.Server for more information.

Constructors Jump to heading

new
Jump to headingServer(requestListener?: http.RequestListener<Request, Response>)
new
Jump to headingServer(
requestListener?: http.RequestListener<Request, Response>,
)

Type Parameters Jump to heading

Jump to headingRequest extends http.IncomingMessage = http.IncomingMessage
Jump to headingResponse extends http.ServerResponse = http.ServerResponse
Jump to headingaddListener(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingaddListener(
event: "keylog",
listener: (
line: Buffer,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingaddListener(
event: "newSession",
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingaddListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingaddListener(
event: "resumeSession",
listener: (
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
) => void
,
): this
Jump to headingaddListener(
event: "secureConnection",
listener: (tlsSocket: tls.TLSSocket) => void,
): this
Jump to headingaddListener(
event: "tlsClientError",
listener: (
err: Error,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingaddListener(
event: "close",
listener: () => void,
): this
Jump to headingaddListener(
event: "connection",
listener: (socket: Duplex) => void,
): this
Jump to headingaddListener(
event: "error",
listener: (err: Error) => void,
): this
Jump to headingaddListener(
event: "listening",
listener: () => void,
): this
Jump to headingaddListener(
event: "checkContinue",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingaddListener(
event: "checkExpectation",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingaddListener(
event: "clientError",
listener: (
err: Error,
socket: Duplex,
) => void
,
): this
Jump to headingaddListener(
event: "connect",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingaddListener(
event: "request",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingaddListener(
event: "upgrade",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this

Closes all connections connected to this server.

Closes all connections connected to this server which are not sending a request or waiting for a response.

Jump to headingemit(
event: string,
...args: any[],
): boolean
Jump to headingemit(
event: "keylog",
line: Buffer,
tlsSocket: tls.TLSSocket,
): boolean
Jump to headingemit(
event: "newSession",
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
): boolean
Jump to headingemit(
event: "OCSPRequest",
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
): boolean
Jump to headingemit(
event: "resumeSession",
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
): boolean
Jump to headingemit(
event: "secureConnection",
tlsSocket: tls.TLSSocket,
): boolean
Jump to headingemit(
event: "tlsClientError",
err: Error,
tlsSocket: tls.TLSSocket,
): boolean
Jump to headingemit(event: "close"): boolean
Jump to headingemit(
event: "connection",
socket: Duplex,
): boolean
Jump to headingemit(
event: "error",
err: Error,
): boolean
Jump to headingemit(event: "listening"): boolean
Jump to headingemit(
event: "checkContinue",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean
Jump to headingemit(
event: "checkExpectation",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean
Jump to headingemit(
event: "clientError",
err: Error,
socket: Duplex,
): boolean
Jump to headingemit(
event: "connect",
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
): boolean
Jump to headingemit(
event: "request",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean
Jump to headingemit(
event: "upgrade",
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
): boolean
Jump to headingon(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingon(
event: "keylog",
listener: (
line: Buffer,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingon(
event: "newSession",
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingon(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingon(
event: "resumeSession",
listener: (
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
) => void
,
): this
Jump to headingon(
event: "secureConnection",
listener: (tlsSocket: tls.TLSSocket) => void,
): this
Jump to headingon(
event: "tlsClientError",
listener: (
err: Error,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingon(
event: "close",
listener: () => void,
): this
Jump to headingon(
event: "connection",
listener: (socket: Duplex) => void,
): this
Jump to headingon(
event: "error",
listener: (err: Error) => void,
): this
Jump to headingon(
event: "listening",
listener: () => void,
): this
Jump to headingon(
event: "checkContinue",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingon(
event: "checkExpectation",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingon(
event: "clientError",
listener: (
err: Error,
socket: Duplex,
) => void
,
): this
Jump to headingon(
event: "connect",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingon(
event: "request",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingon(
event: "upgrade",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingonce(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingonce(
event: "keylog",
listener: (
line: Buffer,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingonce(
event: "newSession",
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingonce(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingonce(
event: "resumeSession",
listener: (
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
) => void
,
): this
Jump to headingonce(
event: "secureConnection",
listener: (tlsSocket: tls.TLSSocket) => void,
): this
Jump to headingonce(
event: "tlsClientError",
listener: (
err: Error,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingonce(
event: "close",
listener: () => void,
): this
Jump to headingonce(
event: "connection",
listener: (socket: Duplex) => void,
): this
Jump to headingonce(
event: "error",
listener: (err: Error) => void,
): this
Jump to headingonce(
event: "listening",
listener: () => void,
): this
Jump to headingonce(
event: "checkContinue",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingonce(
event: "checkExpectation",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingonce(
event: "clientError",
listener: (
err: Error,
socket: Duplex,
) => void
,
): this
Jump to headingonce(
event: "connect",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingonce(
event: "request",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingonce(
event: "upgrade",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingprependListener(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingprependListener(
event: "keylog",
listener: (
line: Buffer,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingprependListener(
event: "newSession",
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingprependListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingprependListener(
event: "resumeSession",
listener: (
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
) => void
,
): this
Jump to headingprependListener(
event: "secureConnection",
listener: (tlsSocket: tls.TLSSocket) => void,
): this
Jump to headingprependListener(
event: "tlsClientError",
listener: (
err: Error,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingprependListener(
event: "close",
listener: () => void,
): this
Jump to headingprependListener(
event: "connection",
listener: (socket: Duplex) => void,
): this
Jump to headingprependListener(
event: "error",
listener: (err: Error) => void,
): this
Jump to headingprependListener(
event: "listening",
listener: () => void,
): this
Jump to headingprependListener(
event: "checkContinue",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingprependListener(
event: "checkExpectation",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingprependListener(
event: "clientError",
listener: (
err: Error,
socket: Duplex,
) => void
,
): this
Jump to headingprependListener(
event: "connect",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingprependListener(
event: "request",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingprependListener(
event: "upgrade",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingprependOnceListener(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingprependOnceListener(
event: "keylog",
listener: (
line: Buffer,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingprependOnceListener(
event: "newSession",
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingprependOnceListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
) => void
,
): this
Jump to headingprependOnceListener(
event: "resumeSession",
listener: (
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
) => void
,
): this
Jump to headingprependOnceListener(
event: "secureConnection",
listener: (tlsSocket: tls.TLSSocket) => void,
): this
Jump to headingprependOnceListener(
event: "tlsClientError",
listener: (
err: Error,
tlsSocket: tls.TLSSocket,
) => void
,
): this
Jump to headingprependOnceListener(
event: "close",
listener: () => void,
): this
Jump to headingprependOnceListener(
event: "connection",
listener: (socket: Duplex) => void,
): this
Jump to headingprependOnceListener(
event: "error",
listener: (err: Error) => void,
): this
Jump to headingprependOnceListener(
event: "listening",
listener: () => void,
): this
Jump to headingprependOnceListener(
event: "checkContinue",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingprependOnceListener(
event: "checkExpectation",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingprependOnceListener(
event: "clientError",
listener: (
err: Error,
socket: Duplex,
) => void
,
): this
Jump to headingprependOnceListener(
event: "connect",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Jump to headingprependOnceListener(
event: "request",
listener: http.RequestListener<Request, Response>,
): this
Jump to headingprependOnceListener(
event: "upgrade",
listener: (
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
) => void
,
): this
Back to top