-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chunk Data/Text frames by outboundMaxFrameSize.
This change fixes a bug when sending text/data that was large WebsocketKit did not chunk these text/data into mutliple frames.
- Loading branch information
Showing
5 changed files
with
149 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
public struct WebSocketMaxFrameSize: ExpressibleByIntegerLiteral { | ||
let value: Int | ||
|
||
public init(_ value: Int) { | ||
precondition(value <= UInt32.max, "invalid overlarge max frame size") | ||
self.value = value | ||
} | ||
|
||
public init(integerLiteral value: Int) { | ||
precondition(value <= UInt32.max, "invalid overlarge max frame size") | ||
self.value = value | ||
} | ||
|
||
public static var `default`: Self { | ||
self.init(integerLiteral: 1 << 14) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters