Skip to main content
Socket.prototype.address - net - Node documentation
method Socket.prototype.address

Usage in Deno

import { Socket } from "node:net";
Socket.prototype.address(): AddressInfo | { }

Returns the bound address, the address family name and port of the socket as reported by the operating system:{ port: 12346, family: 'IPv4', address: '127.0.0.1' }

Return Type