wslink 2.3.2__tar.gz → 2.3.4__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.
Files changed (32) hide show
  1. {wslink-2.3.2 → wslink-2.3.4}/PKG-INFO +1 -1
  2. {wslink-2.3.2 → wslink-2.3.4}/setup.cfg +1 -1
  3. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/aiohttp/__init__.py +15 -0
  4. {wslink-2.3.2 → wslink-2.3.4}/src/wslink.egg-info/PKG-INFO +1 -1
  5. {wslink-2.3.2 → wslink-2.3.4}/MANIFEST.in +0 -0
  6. {wslink-2.3.2 → wslink-2.3.4}/README.rst +0 -0
  7. {wslink-2.3.2 → wslink-2.3.4}/setup.py +0 -0
  8. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/LICENSE +0 -0
  9. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/__init__.py +0 -0
  10. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/__init__.py +0 -0
  11. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/aiohttp/launcher.py +0 -0
  12. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/aiohttp/relay.py +0 -0
  13. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/generic/__init__.py +0 -0
  14. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/generic/core.py +0 -0
  15. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/jupyter/__init__.py +0 -0
  16. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/jupyter/core.py +0 -0
  17. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/tornado/__init__.py +0 -0
  18. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/backends/tornado/core.py +0 -0
  19. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/chunking.py +0 -0
  20. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/emitter.py +0 -0
  21. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/launcher.py +0 -0
  22. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/protocol.py +0 -0
  23. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/publish.py +0 -0
  24. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/relay.py +0 -0
  25. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/server.py +0 -0
  26. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/ssl_context.py +0 -0
  27. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/uri.py +0 -0
  28. {wslink-2.3.2 → wslink-2.3.4}/src/wslink/websocket.py +0 -0
  29. {wslink-2.3.2 → wslink-2.3.4}/src/wslink.egg-info/SOURCES.txt +0 -0
  30. {wslink-2.3.2 → wslink-2.3.4}/src/wslink.egg-info/dependency_links.txt +0 -0
  31. {wslink-2.3.2 → wslink-2.3.4}/src/wslink.egg-info/requires.txt +0 -0
  32. {wslink-2.3.2 → wslink-2.3.4}/src/wslink.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wslink
3
- Version: 2.3.2
3
+ Version: 2.3.4
4
4
  Summary: Python/JavaScript library for communicating over WebSocket
5
5
  Home-page: https://github.com/kitware/wslink
6
6
  Author: Kitware, Inc.
@@ -1,5 +1,5 @@
1
1
  [metadata]
2
- version = 2.3.2
2
+ version = 2.3.4
3
3
 
4
4
  [egg_info]
5
5
  tag_build =
@@ -27,6 +27,19 @@ STATE_KEY = aiohttp_web.AppKey("state", str)
27
27
 
28
28
  logger = logging.getLogger(__name__)
29
29
 
30
+ def reload_settings():
31
+ global MSG_OVERHEAD, MAX_MSG_SIZE, HEART_BEAT, HTTP_HEADERS
32
+
33
+ MSG_OVERHEAD = int(os.environ.get("WSLINK_MSG_OVERHEAD", MSG_OVERHEAD))
34
+ MAX_MSG_SIZE = int(os.environ.get("WSLINK_MAX_MSG_SIZE", MAX_MSG_SIZE))
35
+ HEART_BEAT = int(os.environ.get("WSLINK_HEART_BEAT", HEART_BEAT or 30)) # 30 seconds
36
+ HTTP_HEADERS = os.environ.get("WSLINK_HTTP_HEADERS", HTTP_HEADERS)
37
+
38
+ # Allow to skip heart beat
39
+ if HEART_BEAT < 1:
40
+ HEART_BEAT = None
41
+
42
+
30
43
  # -----------------------------------------------------------------------------
31
44
  # HTTP helpers
32
45
  # -----------------------------------------------------------------------------
@@ -57,6 +70,7 @@ async def http_headers(request: aiohttp_web.Request, handler):
57
70
  # -----------------------------------------------------------------------------
58
71
  class WebAppServer(AbstractWebApp):
59
72
  def __init__(self, server_config):
73
+ reload_settings()
60
74
  AbstractWebApp.__init__(self, server_config)
61
75
  if HTTP_HEADERS:
62
76
  self.set_app(aiohttp_web.Application(middlewares=[http_headers]))
@@ -167,6 +181,7 @@ class WebAppServer(AbstractWebApp):
167
181
 
168
182
  class ReverseWebAppServer(AbstractWebApp):
169
183
  def __init__(self, server_config):
184
+ reload_settings()
170
185
  super().__init__(server_config)
171
186
  self._url = server_config.get("reverse_url")
172
187
  self._server_protocol = server_config.get("ws_protocol")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wslink
3
- Version: 2.3.2
3
+ Version: 2.3.4
4
4
  Summary: Python/JavaScript library for communicating over WebSocket
5
5
  Home-page: https://github.com/kitware/wslink
6
6
  Author: Kitware, Inc.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes