Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/ext/net/lib.deno_net.d.ts>Deno

A modern runtime for JavaScript and TypeScript.
Latest
namespace Deno
import { Deno } from "https://deno.land/x/deno@v2.0.4/ext/net/lib.deno_net.d.ts";

Functions

Connects to the hostname (default is "127.0.0.1") and port on the named transport (default is "tcp"), and resolves to the connection (Conn).

Establishes a secure connection over TLS (transport layer security) using an optional list of CA certs, hostname (default is "127.0.0.1") and port.

Listen announces on the local transport address.

Listen announces on the local transport address over TLS (transport layer security).

Start TLS handshake from an existing connection using an optional list of CA certificates, and hostname (default is "127.0.0.1"). Specifying CA certs is optional. By default the configured root certificates are used. Using this function requires that the other end of the connection is prepared for a TLS handshake.

Interfaces

A generic network listener for stream-oriented protocols.

Provides certified key material from strings. The key material is provided in PEM-format (Privacy Enhanced Mail, https://www.rfc-editor.org/rfc/rfc1422) which can be identified by having -----BEGIN----- and -----END----- markers at the beginning and end of the strings. This type of key is not compatible with DER-format keys which are binary.

Options which can be set when opening a Unix listener via Deno.listen or Deno.listenDatagram.

Type Aliases

Specialized listener that accepts TCP connections.

Specialized listener that accepts TLS connections.

Specialized listener that accepts Unix connections.