diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-11 19:09:04 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-11 19:09:04 +0200 |
| commit | 176b5ed563f7022009b70751e62b7ee7901e6da0 (patch) | |
| tree | dfc3d3b4653cb63ef680cfd5d914fe52ba3a9635 /packages/meshbay-node/src/meshbay_node/daemon.py | |
| parent | aca58f66df5c21be71a7159620d0b50bb969199f (diff) | |
| download | meshbay-176b5ed563f7022009b70751e62b7ee7901e6da0.tar.gz | |
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/daemon.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 |