# sizeOf() function · @imqueue/net

Source: https://imqueue.org/api/net/latest/net.sizeof/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/net 3.0.2 — generated reference, not hand-written

How many bytes one address of the given family occupies.

**Signature:**

```typescript
export declare function sizeOf(type: NetworkType): number;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| type | [NetworkType](https://imqueue.org/api/net/latest/net.networktype/) | the address family to size |


**Returns:**

number

16 for [NetworkType.IPV6](https://imqueue.org/api/net/latest/net.networktype/), otherwise 4.

## Remarks

Anything that is not exactly `IPV6` is treated as IPv4, so an unrecognised value silently sizes as IPv4 rather than throwing. Callers that need the input validated should check it themselves.

