Allow to specify the max websockets frame size when using the upgrader. (#315)

* Allow to specify the max websockets frame size when using the upgrader.

Motivation:

At the moment its not possible to adjust the max websockets frame size when using the upgrader while its possible when directly use the WebSocketFrameDecoder.

Modifications:

Allow to specify max frame size via an init argument (with default value).

Result:

More flexible way to use the upgrader.
This commit is contained in:
Norman Maurer authored and GitHub committed 2018-04-16 20:13:20 +02:00
1 parent b109389c54
commit 178dd76503
4 files changed
+65 -4

No files matched your search

@@ -221,7 +221,7 @@ public final class WebSocketFrameDecoder: ByteToMessageDecoder {
public var cumulationBuffer: ByteBuffer? = nil
/// The maximum frame size the decoder is willing to tolerate from the remote peer.
private let maxFrameSize: Int
/* private but tests */ let maxFrameSize: Int
/// Our parser state.
private var parser = WSParser()