mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
first cut at B2MD v2 (#675)
Motivation: Explain here the context, and why you're making that change. What is the problem you're trying to solve. Modifications: Describe the modifications you've done. Result: After your change, what will change.
This commit is contained in:
1 parent
9b78557aff
commit
cbc214938a
12 files changed
+612
-187
No files matched your search
@@ -224,7 +224,6 @@ public final class WebSocketFrameDecoder: ByteToMessageDecoder {
|
||||
public typealias InboundIn = ByteBuffer
|
||||
public typealias InboundOut = WebSocketFrame
|
||||
public typealias OutboundOut = WebSocketFrame
|
||||
public var cumulationBuffer: ByteBuffer? = nil
|
||||
|
||||
/// The maximum frame size the decoder is willing to tolerate from the remote peer.
|
||||
/* private but tests */ let maxFrameSize: Int
|
||||
@@ -310,7 +309,7 @@ public final class WebSocketFrameDecoder: ByteToMessageDecoder {
|
||||
let frame = WebSocketFrame(fin: true,
|
||||
opcode: .connectionClose,
|
||||
data: data)
|
||||
ctx.writeAndFlush(self.wrapOutboundOut(frame)).whenComplete {
|
||||
ctx.writeAndFlush(self.wrapInboundOut(frame)).whenComplete {
|
||||
ctx.close(promise: nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user