Skip to content

Commit 62be3ec

Browse files
committed
Review feedback
1 parent a73f1a7 commit 62be3ec

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

Sources/SwiftNetwork/Protocols/ManyToManyProtocol.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,16 @@ extension ManyToManyApplicationDatagramProtocol where Flow: AutomaticUpperDatagr
15901590
guard let flow = self.flow(for: flowID) else { throw NetworkError.posix(EINVAL) }
15911591
flow.serviceUpperReceiveQueue()
15921592
}
1593+
1594+
// Enqueue and delivery the datagrams all in one shot
1595+
public func deliverInboundDatagrams(
1596+
flow flowID: MultiplexedFlowIdentifier,
1597+
datagrams: consuming FrameArray
1598+
) throws(NetworkError) {
1599+
guard var flow = self.flow(for: flowID) else { throw NetworkError.posix(EINVAL) }
1600+
try flow.addToUpperReceiveQueue(datagrams)
1601+
flow.serviceUpperReceiveQueue()
1602+
}
15931603
}
15941604

15951605
@available(Network 0.1.0, *)

Sources/SwiftNetwork/QUIC/QUICStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ struct StreamListMembership: OptionSet {
328328
// Also note that a flow identifier can exist in multiple lists at one time.
329329
@available(Network 0.1.0, *)
330330
struct QUICStreamList: ~Copyable {
331-
private var list: Deque<MultiplexedFlowIdentifier> = []
331+
private var list = Deque<MultiplexedFlowIdentifier>()
332332
private let name: StaticString
333333
private let listType: StreamListMembership
334334

0 commit comments

Comments
 (0)