mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
cdp: increase msg size 16KB -> 256KB
And move header size encoding from 2 bytes -> 2 bytes Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -49,7 +49,7 @@ pub const Stream = struct {
|
||||
}
|
||||
|
||||
fn closeCDP(self: *const Stream) void {
|
||||
const close_msg: []const u8 = .{ 5, 0 } ++ "close";
|
||||
const close_msg: []const u8 = .{ 5, 0, 0, 0 } ++ "close";
|
||||
self.recv(close_msg) catch |err| {
|
||||
log.err("stream close error: {any}", .{err});
|
||||
};
|
||||
@@ -87,7 +87,7 @@ pub const Handler = struct {
|
||||
}
|
||||
|
||||
pub fn clientMessage(self: *Handler, data: []const u8) !void {
|
||||
var header: [2]u8 = undefined;
|
||||
var header: [4]u8 = undefined;
|
||||
Msg.setSize(data.len, &header);
|
||||
try self.stream.recv(&header);
|
||||
try self.stream.recv(data);
|
||||
|
||||
Reference in New Issue
Block a user