wslink 2.3.2__py3-none-any.whl → 2.3.3__py3-none-any.whl
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.
- wslink/backends/aiohttp/__init__.py +15 -0
- {wslink-2.3.2.dist-info → wslink-2.3.3.dist-info}/METADATA +1 -1
- {wslink-2.3.2.dist-info → wslink-2.3.3.dist-info}/RECORD +5 -5
- {wslink-2.3.2.dist-info → wslink-2.3.3.dist-info}/WHEEL +0 -0
- {wslink-2.3.2.dist-info → wslink-2.3.3.dist-info}/top_level.txt +0 -0
@@ -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", 4096))
|
34
|
+
MAX_MSG_SIZE = int(os.environ.get("WSLINK_MAX_MSG_SIZE", 4194304))
|
35
|
+
HEART_BEAT = int(os.environ.get("WSLINK_HEART_BEAT", 30)) # 30 seconds
|
36
|
+
HTTP_HEADERS = os.environ.get("WSLINK_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")
|
@@ -11,7 +11,7 @@ wslink/ssl_context.py,sha256=hNOJJCdrStws1Qf6vPvY4vTk9Bf8J5d90W3fS0cRv8o,2290
|
|
11
11
|
wslink/uri.py,sha256=woCQ4yChUqTMg9IT6YYDtUYeKmCg7OUCEgeBGA-19DY,384
|
12
12
|
wslink/websocket.py,sha256=mQCcKHM4xAjlMj3gHeuIDgk9TM9cfNniOb5y_hMMQVg,6279
|
13
13
|
wslink/backends/__init__.py,sha256=cyJGjm-YyBSyOEX81owyTbJ3YnrA6dB7--B4LnsEtHI,1214
|
14
|
-
wslink/backends/aiohttp/__init__.py,sha256=
|
14
|
+
wslink/backends/aiohttp/__init__.py,sha256=aD0STOiYI4_WyTPnhKN2XDywN5o5kcfK3VD5ZBf-1Kc,9796
|
15
15
|
wslink/backends/aiohttp/launcher.py,sha256=gHNMvtgNHEwBN_QBRDSCrTp2B4K1PsfV81rKaHi7Cxo,8897
|
16
16
|
wslink/backends/aiohttp/relay.py,sha256=oZAzIQTpsQaObWXaa-_VtoTOUQALC_QLDd9UvWspYaU,13311
|
17
17
|
wslink/backends/generic/__init__.py,sha256=Qu65gWsd2xCSsxybnDtEDI5vMjHN-F5jgPZOyNIxnGs,112
|
@@ -20,7 +20,7 @@ wslink/backends/jupyter/__init__.py,sha256=Qu65gWsd2xCSsxybnDtEDI5vMjHN-F5jgPZOy
|
|
20
20
|
wslink/backends/jupyter/core.py,sha256=F8R3uH4m6RHCrHHRiA5UAgDOLdyGbpuCSAgCZxANREk,2794
|
21
21
|
wslink/backends/tornado/__init__.py,sha256=Qu65gWsd2xCSsxybnDtEDI5vMjHN-F5jgPZOyNIxnGs,112
|
22
22
|
wslink/backends/tornado/core.py,sha256=tPMkkhWuO_ovkisVim0zcegwZKEAG4IRUdd_O_0a_R0,2157
|
23
|
-
wslink-2.3.
|
24
|
-
wslink-2.3.
|
25
|
-
wslink-2.3.
|
26
|
-
wslink-2.3.
|
23
|
+
wslink-2.3.3.dist-info/METADATA,sha256=ftoh428vQm8_w8T90qSnIv0dnWpxjQ82qAcffEnhH5Y,3120
|
24
|
+
wslink-2.3.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
25
|
+
wslink-2.3.3.dist-info/top_level.txt,sha256=N0d8eqvhwhfW1p1yPTmvxlbzhjz7ZyhBfysNvaFqpQY,7
|
26
|
+
wslink-2.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|