Skip to main content
Socket.prototype.remoteAddress - dgram - Node documentation
method Socket.prototype.remoteAddress

Usage in Deno

import { Socket } from "node:dgram";
Socket.prototype.remoteAddress(): AddressInfo

Returns an object containing the address, family, and port of the remote endpoint. This method throws an ERR_SOCKET_DGRAM_NOT_CONNECTED exception if the socket is not connected.

Return Type

Back to top