ping(_:metadata:)
Send a ping frame on a connection.
Declaration
func ping<Content>(_ content: Content? = nil, @ProtocolMetadataBuilder metadata builder: () -> [NWProtocolMetadata] = {[]}) async throws where Content : DataProtocolParameters
- content:
Optional ping data.
- builder:
A builder for specifying metadata about the content to send.
Discussion
This may be called before the connection is ready, in which case the send will be enqueued until the connection is ready to send.