mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
websockets: add addr server info in Stream
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -25,6 +25,9 @@ const log = std.log.scoped(.handler);
|
|||||||
pub const Stream = struct {
|
pub const Stream = struct {
|
||||||
addr: std.net.Address,
|
addr: std.net.Address,
|
||||||
socket: std.posix.socket_t = undefined,
|
socket: std.posix.socket_t = undefined,
|
||||||
|
|
||||||
|
ws_host: []const u8,
|
||||||
|
ws_port: u16,
|
||||||
ws_conn: *ws.Conn = undefined,
|
ws_conn: *ws.Conn = undefined,
|
||||||
|
|
||||||
fn connectCDP(self: *Stream) !void {
|
fn connectCDP(self: *Stream) !void {
|
||||||
|
|||||||
@@ -263,7 +263,11 @@ pub fn main() !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// start stream server in separate thread
|
// 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(
|
const cdp_thread = try std.Thread.spawn(
|
||||||
.{ .allocator = alloc },
|
.{ .allocator = alloc },
|
||||||
server.handle,
|
server.handle,
|
||||||
|
|||||||
2
vendor/websocket.zig
vendored
2
vendor/websocket.zig
vendored
Submodule vendor/websocket.zig updated: 215493b71e...1b49626c78
Reference in New Issue
Block a user