---
title: "resolve(withTimeout:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/netservice/resolve(withtimeout:)"
---

# resolve(withTimeout:)

Starts a resolve process of a finite duration for the service.

## Declaration

```swift
func resolve(withTimeout timeout: TimeInterval)
```

## Parameters

- `timeout`: The maximum number of seconds to attempt a resolve. A value of 0.0 indicates no timeout and a resolve process of indefinite duration.

## Discussion

Discussion During the resolve period, the service sends netServiceDidResolveAddress(_:) to the delegate for each address it discovers that matches the service parameters. Once the timeout is hit, the service sends netServiceDidStop(_:) to the delegate. If no addresses resolve during the timeout period, the service sends netService(_:didNotResolve:) to the delegate.

## See Also

### Related Documentation

- [addresses](foundation/netservice/addresses.md)

### Using Network Services

- [publish()](foundation/netservice/publish().md)
- [publish(options:)](foundation/netservice/publish(options:).md)
- [resolve()](foundation/netservice/resolve().md)
- [port](foundation/netservice/port.md)
- [startMonitoring()](foundation/netservice/startmonitoring().md)
- [stop()](foundation/netservice/stop().md)
- [stopMonitoring()](foundation/netservice/stopmonitoring().md)
