<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Event",
  "identifier" : "/documentation/Event/Socket/remoteAddress",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Event"
    ],
    "preciseIdentifier" : "s:5Event6SocketC13remoteAddressAA0bD0VSgvp"
  },
  "title" : "remoteAddress"
}
-->

# remoteAddress

The peer’s endpoint, as reported by `getpeername(2)`.

```
var remoteAddress: SocketAddress? { get }
```

## Discussion

On an accepted server-side socket this is the connecting client; on a
connected client socket this is the server. Returns `nil` if the
syscall fails (e.g. the socket is not connected, or has been closed).