---
title: connectionRefused
framework: system
role: symbol
role_heading: Type Property
path: system/errno/connectionrefused
---

# connectionRefused

Connection refused.

## Declaration

```swift
static var connectionRefused: Errno { get }
```

## Mentioned in

Adopting Swift Error Constants

## Discussion

Discussion No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that’s inactive on the foreign host. The corresponding C error is ECONNREFUSED.

## See Also

### Network Errors

- [connectionAbort](system/errno/connectionabort.md)
- [connectionReset](system/errno/connectionreset.md)
- [hostIsDown](system/errno/hostisdown.md)
- [messageTooLong](system/errno/messagetoolong.md)
- [networkDown](system/errno/networkdown.md)
- [networkReset](system/errno/networkreset.md)
- [networkUnreachable](system/errno/networkunreachable.md)
- [noBufferSpace](system/errno/nobufferspace.md)
- [noRouteToHost](system/errno/noroutetohost.md)
- [notSupported](system/errno/notsupported.md)
- [timedOut](system/errno/timedout.md)
