Skip to content

Commit 4672f31

Browse files
committed
Merge branch 'master' into pooling
2 parents 26df213 + 70ad494 commit 4672f31

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/AsyncHTTPClient/HTTPHandler.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ extension HTTPClient {
2727
public struct StreamWriter {
2828
let closure: (IOData) -> EventLoopFuture<Void>
2929

30+
/// Create new StreamWriter
31+
///
32+
/// - parameters:
33+
/// - closure: function that will be called to write actual bytes to the channel.
34+
public init(closure: @escaping (IOData) -> EventLoopFuture<Void>) {
35+
self.closure = closure
36+
}
37+
3038
/// Write data to server.
3139
///
3240
/// - parameters:

0 commit comments

Comments
 (0)