mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
use async-client for telemetry
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user