---
title: "setClientRequestHandler(_:handler:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/nwprotocolwebsocket/options/setclientrequesthandler(_:handler:)"
---

# setClientRequestHandler(_:handler:)

Sets a handler to react to as a server to inbound WebSocket client handshakes.

## Declaration

```swift
@preconcurrency func setClientRequestHandler(_ queue: DispatchQueue, handler: @escaping @Sendable ([String], [(name: String, value: String)]) -> NWProtocolWebSocket.Response)
```

## See Also

### Handling Server Handshakes

- [NWProtocolWebSocket.Response](network/nwprotocolwebsocket/response.md)
