forked from apple/swift-nio-http2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNIOHTTP2FrameDelegate.swift
More file actions
30 lines (28 loc) · 1.1 KB
/
NIOHTTP2FrameDelegate.swift
File metadata and controls
30 lines (28 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2025 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIOHPACK
/// A delegate which can be used with the ``NIOHTTP2Handler`` which is notified
/// when various frame types are written into the connection channel.
///
/// This delegate, when used by the ``NIOHTTP2Handler`` will be called on the event
/// loop associated with the channel that the handler is a part of. As such you should
/// avoid doing expensive or blocking work in this delegate.
public protocol NIOHTTP2FrameDelegate {
/// Called when a frame is written by the connection channel.
///
/// - Parameters:
/// - frame: The frame to write.
func wroteFrame(_ frame: HTTP2Frame)
}