meshsocket 0.4.1__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {meshsocket-0.4.1 → meshsocket-0.4.3}/PKG-INFO +1 -1
- {meshsocket-0.4.1 → meshsocket-0.4.3}/meshsocket/__init__.py +1 -1
- {meshsocket-0.4.1 → meshsocket-0.4.3}/meshsocket.egg-info/PKG-INFO +1 -1
- {meshsocket-0.4.1 → meshsocket-0.4.3}/pyproject.toml +1 -1
- {meshsocket-0.4.1 → meshsocket-0.4.3}/socket_server.py +7 -2
- {meshsocket-0.4.1 → meshsocket-0.4.3}/LICENSE +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/README.md +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/meshsocket.egg-info/SOURCES.txt +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/meshsocket.egg-info/dependency_links.txt +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/meshsocket.egg-info/requires.txt +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/meshsocket.egg-info/top_level.txt +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/setup.cfg +0 -0
- {meshsocket-0.4.1 → meshsocket-0.4.3}/socketCore.py +0 -0
|
@@ -7,4 +7,4 @@ so existing code keeps running while it migrates to the package name.
|
|
|
7
7
|
from socketCore import MeshSocket, LogColors, sanitize_identity, valid_ident, IDENT_RE, NAMESPACED_RE
|
|
8
8
|
|
|
9
9
|
__all__ = ["MeshSocket", "LogColors", "sanitize_identity", "valid_ident", "IDENT_RE", "NAMESPACED_RE"]
|
|
10
|
-
__version__ = "0.4.
|
|
10
|
+
__version__ = "0.4.3"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "meshsocket"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.3"
|
|
8
8
|
description = "Lightweight WebSocket mesh networking — broadcast, direct routing, and request/response over a simple JSON wire protocol."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -500,13 +500,18 @@ class MeshServer:
|
|
|
500
500
|
if not isinstance(payload, dict):
|
|
501
501
|
return {"error": "malformed route", "status": "failed"}
|
|
502
502
|
target_id = payload.get('target_id')
|
|
503
|
+
target_name = payload.get('target_name')
|
|
503
504
|
msg_type = payload.get('type')
|
|
504
505
|
# The target learns who sent this from the relay, not the sender.
|
|
505
506
|
data = stamp_sender(payload.get('payload'), client.name)
|
|
506
|
-
|
|
507
|
+
# Address by id, or by name like route_msg_noreply (the app's hub-audio
|
|
508
|
+
# requests name the hub: CAR-TER aif-6e55l, spec "Wire contract").
|
|
509
|
+
by_id = isinstance(target_id, str)
|
|
510
|
+
address = target_id if by_id else target_name
|
|
511
|
+
if not isinstance(msg_type, str) or not isinstance(address, str):
|
|
507
512
|
return {"error": "malformed route", "status": "failed"}
|
|
508
513
|
|
|
509
|
-
target = self.clients.get(
|
|
514
|
+
target = self.clients.get(address) if by_id else self.clients_by_name.get(address)
|
|
510
515
|
if not target:
|
|
511
516
|
return {"error": "Target not found", "status": "failed"}
|
|
512
517
|
if not client.can_route:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|