mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-18 01:48:10 +00:00
cdp: remove send sync
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -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
|
||||
// ------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user