From 176b5ed563f7022009b70751e62b7ee7901e6da0 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sun, 11 Oct 2026 19:09:04 +0200 Subject: feat(node): carry connections on several cores connection_processes (default 1) starts that many processes for the WebRTC stack; sessions and keys stay in the node. Set from node.toml or the Node page, applied to new connections. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-node/src/meshbay_node/daemon.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py') diff --git a/packages/meshbay-node/src/meshbay_node/daemon.py b/packages/meshbay-node/src/meshbay_node/daemon.py index 6fba120..4d89f97 100644 --- a/packages/meshbay-node/src/meshbay_node/daemon.py +++ b/packages/meshbay-node/src/meshbay_node/daemon.py @@ -544,7 +544,12 @@ class NodeDaemon(EnrichmentMixin): max_upload_gb=self._config.node.max_upload_gb, transcode_incompatible_video=self._config.node.transcode_incompatible_video, stun_servers=self._config.node.stun_servers or None, + connection_processes=self._config.node.connection_processes, + ice_interfaces=self._config.node.ice_interfaces or None, ) + # Started now rather than by the first offer, which would wait + # for them: a process takes a second or two to come up. + await self._webrtc._workers.ensure() # No global chat_store here: each group's store lives in # groups_ctx[gid]["chat_store"] and is resolved per session via # _group_ctx(). Assigning the first group's store transport-wide @@ -1692,6 +1697,11 @@ def bind_control_port(port: int) -> socket.socket: def main() -> None: + # A connection process of a running node (transport/webrtc/workers.py). A + # frozen build has no `python -m` to start one with, so it starts itself. + if sys.argv[1:2] == ["webrtc-worker"]: + from meshbay_node.transport.webrtc.worker import main as worker_main + return worker_main() args = start() if run(args): return -- cgit v1.2.3