---
title: NWListener
framework: network
role: symbol
role_heading: Class
path: network/nwlistener
---

# NWListener

An object you use to listen for incoming network connections.

## Declaration

```swift
final class NWListener
```

## Mentioned in

Creating an Identity for Local Network TLS

## Topics

### Creating Listeners

- [init(using:on:)](network/nwlistener/init(using:on:).md)
- [start(queue:)](network/nwlistener/start(queue:).md)
- [stateUpdateHandler](network/nwlistener/stateupdatehandler.md)
- [NWListener.State](network/nwlistener/state-swift.enum.md)
- [port](network/nwlistener/port.md)
- [cancel()](network/nwlistener/cancel().md)

### Receiving Connections

- [newConnectionHandler](network/nwlistener/newconnectionhandler.md)
- [newConnectionLimit](network/nwlistener/newconnectionlimit.md)
- [InfiniteConnectionLimit](network/nwlistener/infiniteconnectionlimit.md)

### Advertising Bonjour Services

- [NSBonjourServices](bundleresources/information-property-list/nsbonjourservices.md)
- [NSLocalNetworkUsageDescription](bundleresources/information-property-list/nslocalnetworkusagedescription.md)
- [service](network/nwlistener/service-swift.property.md)
- [NWListener.Service](network/nwlistener/service-swift.struct.md)
- [serviceRegistrationUpdateHandler](network/nwlistener/serviceregistrationupdatehandler.md)
- [NWListener.ServiceRegistrationChange](network/nwlistener/serviceregistrationchange.md)

### Inspecting Listeners

- [parameters](network/nwlistener/parameters.md)
- [queue](network/nwlistener/queue.md)

### Initializers

- [init(applicationService:using:)](network/nwlistener/init(applicationservice:using:).md)
- [init(launchd:using:)](network/nwlistener/init(launchd:using:).md)
- [init(launchdSocketKey:parameters:)](network/nwlistener/init(launchdsocketkey:parameters:).md)
- [init(service:using:)](network/nwlistener/init(service:using:).md)

### Instance Properties

- [newConnectionGroupHandler](network/nwlistener/newconnectiongrouphandler.md)
- [state](network/nwlistener/state-swift.property.md)

## Relationships

### Conforms To

- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Connections and Listeners

- [NWConnection](network/nwconnection.md)
- [NWBrowser](network/nwbrowser.md)
- [NWConnectionGroup](network/nwconnectiongroup.md)
- [NWEthernetChannel](network/nwethernetchannel.md)
