Move Net staff to clean network module

This commit is contained in:
Nikolay Govorov
2026-02-24 02:50:03 +00:00
parent a041162b32
commit 5fea1df42b
7 changed files with 1493 additions and 1408 deletions

View File

@@ -699,7 +699,7 @@ pub fn BrowserContext(comptime CDP_T: type) type {
};
const cdp = self.cdp;
const allocator = cdp.client.send_arena.allocator();
const allocator = cdp.client.sendAllocator();
const field = ",\"sessionId\":\"";

View File

@@ -48,6 +48,10 @@ const Client = struct {
};
}
pub fn sendAllocator(self: *Client) Allocator {
return self.send_arena.allocator();
}
pub fn sendJSON(self: *Client, message: anytype, opts: json.Stringify.Options) !void {
var opts_copy = opts;
opts_copy.whitespace = .indent_2;