cdp: remove send sync

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-10-21 18:29:10 +02:00
parent 20dd140c31
commit 8508c21080
4 changed files with 5 additions and 14 deletions

View File

@@ -336,9 +336,8 @@ pub const Ctx = struct {
tpl,
.{ msg_open, cdp.ContextSessionID },
);
defer ctx.alloc().free(s);
try sendSync(ctx, s);
try sendAsync(ctx, s);
}
pub fn onInspectorResp(ctx_opaque: *anyopaque, _: u32, msg: []const u8) void {
@@ -401,10 +400,6 @@ pub fn sendAsync(ctx: *Ctx, msg: []const u8) !void {
ctx.loop.io.send(*Send, sd, Send.asyncCbk, &sd.completion, ctx.conn_socket, msg);
}
pub fn sendSync(ctx: *Ctx, msg: []const u8) !void {
_ = try std.posix.write(ctx.conn_socket, msg);
}
// Listen
// ------