websockets: add addr server info in Stream

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier committed 2024-12-04 12:07:52 +01:00
1 parent 3088c7a632
commit 8ef79e348c
3 files changed
+9 -2

No files matched your search

+3
View File
@@ -25,6 +25,9 @@ const log = std.log.scoped(.handler);
pub const Stream = struct {
addr: std.net.Address,
socket: std.posix.socket_t = undefined,
ws_host: []const u8,
ws_port: u16,
ws_conn: *ws.Conn = undefined,
fn connectCDP(self: *Stream) !void {
+5 -1
View File
@@ -263,7 +263,11 @@ pub fn main() !void {
}
// start stream server in separate thread
var stream = handler.Stream{ .addr = addr };
var stream = handler.Stream{
.ws_host = opts.host,
.ws_port = opts.port,
.addr = addr,
};
const cdp_thread = try std.Thread.spawn(
.{ .allocator = alloc },
server.handle,