Skip to main content
BlockList.prototype.addAddress - node__net.d.ts - Node documentation
method BlockList.prototype.addAddress

Usage in Deno

```typescript import { BlockList } from "node:node__net.d.ts"; ```
BlockList.prototype.addAddress(
address: string,
type?: IPVersion,
): void
Adds a rule to block the given IP address.

Parameters

address: string
An IPv4 or IPv6 address.
optional
type: IPVersion = 'ipv4'
Either `'ipv4'` or `'ipv6'`.

Return Type

void
BlockList.prototype.addAddress(address: SocketAddress): void

Parameters

address: SocketAddress

Return Type

void