---
title: "autoReplyPing(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/websocket/autoreplyping(_:)"
---

# autoReplyPing(_:)

Configure the WebSocket protocol to automatically reply to pings.

## Declaration

```swift
func autoReplyPing(_ reply: Bool) -> WebSocket
```

## Parameters

- `reply`: If true, ping messages will automatically be consumed by the connection instead of being delivered to the . Defaults to false.
