use async-client for telemetry

This commit is contained in:
Karl Seguin
2025-03-03 19:32:18 +08:00
parent 53f6e66c23
commit accf2c0e5e
6 changed files with 201 additions and 109 deletions

View File

@@ -34,6 +34,7 @@ const CloseError = jsruntime.IO.CloseError;
const CancelError = jsruntime.IO.CancelOneError;
const TimeoutError = jsruntime.IO.TimeoutError;
const App = @import("app.zig").App;
const CDP = @import("cdp/cdp.zig").CDP;
const TimeoutCheck = std.time.ns_per_ms * 100;
@@ -48,6 +49,7 @@ const MAX_HTTP_REQUEST_SIZE = 2048;
const MAX_MESSAGE_SIZE = 256 * 1024 + 14;
const Server = struct {
app: *App,
allocator: Allocator,
loop: *jsruntime.Loop,
@@ -1018,6 +1020,7 @@ pub fn run(
address: net.Address,
timeout: u64,
loop: *jsruntime.Loop,
app: *App,
) !void {
// create socket
const flags = posix.SOCK.STREAM | posix.SOCK.CLOEXEC | posix.SOCK.NONBLOCK;
@@ -1043,6 +1046,7 @@ pub fn run(
const json_version_response = try buildJSONVersionResponse(allocator, address);
var server = Server{
.app = app,
.loop = loop,
.timeout = timeout,
.listener = listener,