chore: update ws
This commit is contained in:
parent
10b17f6021
commit
6e3ef1f69e
|
@ -4,8 +4,8 @@
|
|||
|
||||
.dependencies = .{
|
||||
.ws = .{
|
||||
.url = "https://github.com/nikneym/ws/archive/df714e6f851b75f05b11bfe539959b8e6646f415.tar.gz",
|
||||
.hash = "12207a08e2c53febf3b5661832376445a60b300702df9efa526b1c723ed126050ddb",
|
||||
.url = "https://github.com/nikneym/ws/archive/9909cd2c7a24bc101f40fbed7d30f85727fa5f82.tar.gz",
|
||||
.hash = "1220da5c65b2a78b03424b211f6dd6ba86415110f7e1852adc7ecf40bea804745cfb",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -64,10 +64,12 @@ pub fn main() !void {
|
|||
if (c.notify_init("ntfylisten") == 0)
|
||||
return error.LibnotifyInit;
|
||||
|
||||
const addr = try std.fmt.allocPrint(std.heap.c_allocator, "ws://{s}/{s}/ws", .{ server, topic });
|
||||
defer std.heap.c_allocator.free(addr);
|
||||
const addr_s = try std.fmt.allocPrint(std.heap.c_allocator, "ws://{s}/{s}/ws", .{ server, topic });
|
||||
defer std.heap.c_allocator.free(addr_s);
|
||||
|
||||
log.info("connecting to WebSocket URL {s}", .{addr});
|
||||
const addr = try std.Uri.parse(addr_s);
|
||||
|
||||
log.info("connecting to WebSocket URL {s}", .{addr_s});
|
||||
var ws_client = try ws.connect(std.heap.c_allocator, addr, &.{
|
||||
.{ "Host", server },
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue