Add functional test Exemple
This commit is contained in:
@@ -3,16 +3,18 @@
|
|||||||
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
|
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
|
||||||
cmake_minimum_required (VERSION 3.0)
|
cmake_minimum_required (VERSION 3.0)
|
||||||
|
|
||||||
project (domo-iot)
|
project (domo)
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build/bin")
|
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build/bin")
|
||||||
|
set(ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/build/lib")
|
||||||
set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build/lib")
|
set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build/lib")
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules/")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules/")
|
||||||
|
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../nats.c ${CMAKE_CURRENT_BINARY_DIR}/nats.c)
|
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../json-c ${CMAKE_CURRENT_BINARY_DIR}/json-c)
|
|
||||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libuv ${CMAKE_CURRENT_BINARY_DIR}/libuv)
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libuv ${CMAKE_CURRENT_BINARY_DIR}/libuv)
|
||||||
add_subdirectory (src)
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libwebsockets ${CMAKE_CURRENT_BINARY_DIR}/libwebsockets)
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../nats.c ${CMAKE_CURRENT_BINARY_DIR}/nats.c)
|
||||||
|
#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../json-c ${CMAKE_CURRENT_BINARY_DIR}/json-c)
|
||||||
|
add_subdirectory(src)
|
||||||
|
|
||||||
add_custom_target (static_analysis
|
add_custom_target (static_analysis
|
||||||
COMMAND echo "Static Analysis ......"
|
COMMAND echo "Static Analysis ......"
|
||||||
|
|||||||
@@ -6,11 +6,23 @@ fi
|
|||||||
|
|
||||||
CMAKE_OPTS="-DCMAKE_EXPORT_COMPILE_COMMANDS=On"
|
CMAKE_OPTS="-DCMAKE_EXPORT_COMPILE_COMMANDS=On"
|
||||||
|
|
||||||
# Options for CIVETWEB
|
#
|
||||||
CMAKE_OPTS="$CMAKE_OPTS -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF"
|
|
||||||
CMAKE_OPTS="$CMAKE_OPTS -DCIVETWEB_ENABLE_CXX=ON"
|
# Options for LIBWEBSOCKET
|
||||||
CMAKE_OPTS="$CMAKE_OPTS -DCIVETWEB_ENABLE_WEBSOCKETS=ON"
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITH_HTTP2=OFF"
|
||||||
CMAKE_OPTS="$CMAKE_OPTS -DCIVETWEB_BUILD_TESTING=OFF"
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITH_STATIC=ON"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITH_SHARED=OFF"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITH_SSL=OFF"
|
||||||
|
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITH_LIBUV=ON"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLIBUV_INCLUDE_DIRS=$PWD/../libuv/include/"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLIBUV_LIBRARIES=$PWD/build/lib/"
|
||||||
|
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITHOUT_TESTAPPS=ON"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITHOUT_TEST_SERVER=ON"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITHOUT_TEST_PING=ON"
|
||||||
|
CMAKE_OPTS="$CMAKE_OPTS -DLWS_WITHOUT_TEST_CLIENT=ON"
|
||||||
|
|
||||||
# Options for NATS.c
|
# Options for NATS.c
|
||||||
CMAKE_OPTS="$CMAKE_OPTS -DNATS_BUILD_EXAMPLES=OFF"
|
CMAKE_OPTS="$CMAKE_OPTS -DNATS_BUILD_EXAMPLES=OFF"
|
||||||
|
|||||||
9
mount-origin/404.html
Normal file
9
mount-origin/404.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<meta charset="UTF-8">
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<img src="libwebsockets.org-logo.svg"><br>
|
||||||
|
<h1>404</h1>
|
||||||
|
Sorry, that file doesn't exist.
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
BIN
mount-origin/candide.zip
Normal file
BIN
mount-origin/candide.zip
Normal file
Binary file not shown.
BIN
mount-origin/favicon.ico
Normal file
BIN
mount-origin/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
mount-origin/http2.png
Normal file
BIN
mount-origin/http2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
mount-origin/leaf.jpg
Normal file
BIN
mount-origin/leaf.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
120
mount-origin/libwebsockets.org-logo.svg
Normal file
120
mount-origin/libwebsockets.org-logo.svg
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="127.63mm" height="27.837mm" version="1.1" viewBox="0 0 127.63446 27.837189" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<filter id="a" x="-.011681" y="-.053882" width="1.0234" height="1.1078" color-interpolation-filters="sRGB">
|
||||||
|
<feGaussianBlur stdDeviation="0.10687168"/>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
<g transform="translate(452.86 42.871)">
|
||||||
|
<rect x="-452.86" y="-42.871" width="127.63" height="27.837" fill="none"/>
|
||||||
|
<g transform="matrix(4.0081 0 0 4.0081 -211.01 -224.26)" fill="#fff" filter="url(#a)" stroke="#fff">
|
||||||
|
<g style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="libwebsockets.org">
|
||||||
|
<path d="m-52.015 48.429q0 0.12497 0.03213 0.17852 0.0357 0.05356 0.0964 0.05356 0.07498 0 0.17495-0.03927l0.02499 0.20709q-0.04642 0.02856-0.13211 0.04642-0.08212 0.01785-0.14996 0.01785-0.13568 0-0.22137-0.08212-0.08212-0.08569-0.08212-0.29635v-2.1601h0.25707z"/>
|
||||||
|
<path d="m-51.417 47.068h0.25707v1.7852h-0.25707zm-0.04642-0.54271q0-0.08569 0.04642-0.13925 0.04999-0.05356 0.12854-0.05356 0.07855 0 0.12854 0.05356 0.05356 0.04999 0.05356 0.13925 0 0.08569-0.05356 0.13568-0.04999 0.04642-0.12854 0.04642-0.07855 0-0.12854-0.04999-0.04642-0.04999-0.04642-0.13211z"/>
|
||||||
|
<path d="m-50.686 46.354h0.25707v0.84976h0.01071q0.14639-0.17852 0.38918-0.17852 0.27492 0 0.4106 0.2178 0.13925 0.2178 0.13925 0.6891 0 0.48201-0.18566 0.71766-0.18209 0.23565-0.51771 0.23565-0.16424 0-0.29992-0.03571-0.13568-0.03927-0.20352-0.08926zm0.25707 2.2387q0.04999 0.02856 0.1214 0.04641 0.07498 0.01428 0.1571 0.01428 0.18566 0 0.29278-0.17495 0.11068-0.17852 0.11068-0.54628 0-0.15353-0.02142-0.27492-0.01785-0.12496-0.0607-0.21423-0.03927-0.08926-0.10711-0.13568-0.06427-0.04999-0.1571-0.04999-0.12854 0-0.21423 0.07855-0.08212 0.07498-0.1214 0.20708z"/>
|
||||||
|
<path d="m-48.092 47.068 0.24993 0.91403 0.04284 0.29635h0.01428l0.0357-0.29992 0.16781-0.91046h0.38561l-0.43916 1.8031h-0.33562l-0.26778-0.99615-0.02856-0.22851h-0.02142l-0.02499 0.23565-0.25707 0.98901h-0.34633l-0.45702-1.8031h0.46059l0.1928 0.89618 0.03213 0.31777h0.01428l0.04642-0.32134 0.2178-0.89261z"/>
|
||||||
|
<path d="m-45.889 48.721q-0.08926 0.07855-0.24279 0.12854-0.15353 0.04999-0.32134 0.04999-0.18566 0-0.32134-0.06427-0.13211-0.06427-0.2178-0.18566-0.08569-0.1214-0.12854-0.29278-0.03927-0.17495-0.03927-0.39632 0-0.48201 0.18923-0.71052 0.1928-0.23208 0.532-0.23208 0.11425 0 0.22137 0.0357 0.10711 0.03213 0.18923 0.11425 0.08569 0.07855 0.13568 0.21423 0.05356 0.13211 0.05356 0.33562 0 0.07855-0.01071 0.16781-0.0071 0.08926-0.02499 0.1928h-0.86762q0.0071 0.22137 0.09283 0.33919 0.08569 0.11782 0.27492 0.11782 0.11425 0 0.20709-0.0357 0.0964-0.0357 0.14639-0.07498zm-0.55699-1.3389q-0.13568 0-0.20352 0.11068-0.06784 0.10711-0.07855 0.30349h0.49272q0.01071-0.20352-0.04284-0.30706-0.05356-0.10711-0.16781-0.10711z"/>
|
||||||
|
<path d="m-45.569 46.354h0.42488v0.82834h0.01071q0.12854-0.1571 0.36776-0.1571 0.2535 0 0.39275 0.21066 0.14282 0.21066 0.14282 0.67838 0 0.507-0.19994 0.74622-0.19994 0.23565-0.54628 0.23565-0.18923 0-0.3499-0.0357-0.1571-0.03571-0.24279-0.07855zm0.42488 2.1137q0.07498 0.03927 0.19638 0.03927 0.13568 0 0.20708-0.12854 0.07141-0.13211 0.07141-0.43916 0-0.27135-0.05713-0.39632-0.05713-0.12854-0.17852-0.12854-0.17852 0-0.23922 0.18566z"/>
|
||||||
|
<path d="m-43.386 48.379q0-0.07498-0.04999-0.12496-0.04642-0.05356-0.1214-0.0964-0.07498-0.04642-0.16067-0.09283-0.08212-0.04641-0.1571-0.11425-0.07498-0.06784-0.12496-0.16424-0.04642-0.0964-0.04642-0.24279 0-0.24993 0.13568-0.38561 0.13568-0.13568 0.39989-0.13568 0.1571 0 0.29635 0.0357 0.13925 0.03213 0.22137 0.08212l-0.09997 0.32848q-0.06784-0.02856-0.16424-0.05356-0.0964-0.02856-0.18923-0.02856-0.17495 0-0.17495 0.14639 0 0.06784 0.04642 0.11425 0.04999 0.04284 0.12496 0.08569 0.07498 0.04284 0.1571 0.08926 0.08569 0.04642 0.16067 0.11782 0.07498 0.06784 0.1214 0.16781 0.04999 0.09997 0.04999 0.24636 0 0.24636-0.14996 0.39632-0.14996 0.14996-0.4463 0.14996-0.14639 0-0.2892-0.0357-0.13925-0.0357-0.22494-0.09283l0.11782-0.34276q0.07498 0.04285 0.17138 0.07498 0.09997 0.03213 0.20709 0.03213 0.08212 0 0.13568-0.0357 0.05356-0.03928 0.05356-0.1214z"/>
|
||||||
|
<path d="m-42.802 47.961q0-0.47487 0.18566-0.70695 0.18566-0.23208 0.51771-0.23208 0.35704 0 0.532 0.23565 0.17495 0.23565 0.17495 0.70338 0 0.47844-0.18566 0.71052-0.18566 0.22851-0.52128 0.22851-0.70338 0-0.70338-0.93902zm0.43916 0q0 0.26778 0.0607 0.41417t0.20352 0.14639q0.13568 0 0.19994-0.12497 0.06784-0.12854 0.06784-0.43559 0-0.27492-0.0607-0.41774-0.0607-0.14282-0.20708-0.14282-0.12497 0-0.19638 0.12854-0.06784 0.12497-0.06784 0.43202z"/>
|
||||||
|
<path d="m-40.094 48.757q-0.08926 0.07141-0.21423 0.10711-0.12496 0.0357-0.24993 0.0357-0.18209 0-0.30706-0.06427-0.1214-0.06784-0.19994-0.18923-0.07855-0.12496-0.11425-0.29635-0.03213-0.17495-0.03213-0.38918 0-0.46773 0.16781-0.70338 0.16781-0.23565 0.49272-0.23565 0.16067 0 0.26064 0.02856 0.10354 0.02856 0.18209 0.07141l-0.09997 0.35347q-0.06427-0.03213-0.12497-0.04642-0.05713-0.01785-0.13925-0.01785-0.14996 0-0.22494 0.13211-0.07498 0.12854-0.07498 0.41774 0 0.24279 0.07498 0.39632 0.07855 0.15353 0.24636 0.15353 0.08926 0 0.14996-0.02142 0.06427-0.02499 0.11782-0.0607z"/>
|
||||||
|
<path d="m-39.374 48.114h-0.09997v0.73908h-0.42488v-2.4993h0.42488v1.4746l0.08569-0.04999 0.29635-0.71052h0.46059l-0.32848 0.70695-0.15353 0.1214 0.16781 0.1214 0.36418 0.83548h-0.47844z"/>
|
||||||
|
<path d="m-37.256 48.721q-0.08926 0.07855-0.24279 0.12854-0.15353 0.04999-0.32134 0.04999-0.18566 0-0.32134-0.06427-0.13211-0.06427-0.2178-0.18566-0.08569-0.1214-0.12854-0.29278-0.03927-0.17495-0.03927-0.39632 0-0.48201 0.18923-0.71052 0.1928-0.23208 0.532-0.23208 0.11425 0 0.22137 0.0357 0.10711 0.03213 0.18923 0.11425 0.08569 0.07855 0.13568 0.21423 0.05356 0.13211 0.05356 0.33562 0 0.07855-0.01071 0.16781-0.0071 0.08926-0.02499 0.1928h-0.86763q0.0071 0.22137 0.09283 0.33919 0.08569 0.11782 0.27492 0.11782 0.11425 0 0.20708-0.0357 0.0964-0.0357 0.14639-0.07498zm-0.55699-1.3389q-0.13568 0-0.20352 0.11068-0.06784 0.10711-0.07855 0.30349h0.49272q0.01071-0.20352-0.04284-0.30706-0.05356-0.10711-0.16781-0.10711z"/>
|
||||||
|
<path d="m-37.075 47.068h0.19637v-0.33562l0.42488-0.13211v0.46773h0.34633v0.37847h-0.34633v0.77836q0 0.15353 0.02856 0.2178 0.03213 0.06427 0.11068 0.06427 0.05356 0 0.0964-0.01071t0.09283-0.03213l0.05356 0.33919q-0.07855 0.03928-0.18209 0.06427-0.10354 0.02856-0.2178 0.02856-0.20352 0-0.30706-0.11782-0.09997-0.11782-0.09997-0.39632v-0.93546h-0.19637z"/>
|
||||||
|
<path d="m-35.297 48.379q0-0.07498-0.04999-0.12496-0.04641-0.05356-0.1214-0.0964-0.07498-0.04642-0.16067-0.09283-0.08212-0.04641-0.1571-0.11425-0.07498-0.06784-0.12496-0.16424-0.04642-0.0964-0.04642-0.24279 0-0.24993 0.13568-0.38561 0.13568-0.13568 0.39989-0.13568 0.1571 0 0.29635 0.0357 0.13925 0.03213 0.22137 0.08212l-0.09997 0.32848q-0.06784-0.02856-0.16424-0.05356-0.0964-0.02856-0.18923-0.02856-0.17495 0-0.17495 0.14639 0 0.06784 0.04642 0.11425 0.04999 0.04284 0.12497 0.08569 0.07498 0.04284 0.1571 0.08926 0.08569 0.04642 0.16067 0.11782 0.07498 0.06784 0.1214 0.16781 0.04999 0.09997 0.04999 0.24636 0 0.24636-0.14996 0.39632-0.14996 0.14996-0.4463 0.14996-0.14639 0-0.2892-0.0357-0.13925-0.0357-0.22494-0.09283l0.11782-0.34276q0.07498 0.04285 0.17138 0.07498 0.09997 0.03213 0.20708 0.03213 0.08212 0 0.13568-0.0357 0.05356-0.03928 0.05356-0.1214z"/>
|
||||||
|
<path d="m-34.662 48.693q0-0.09997 0.04642-0.14996 0.04999-0.04999 0.13211-0.04999 0.08212 0 0.12854 0.04999 0.04999 0.04999 0.04999 0.14996 0 0.10354-0.04999 0.15353-0.04642 0.04999-0.12854 0.04999-0.08212 0-0.13211-0.04999-0.04642-0.04999-0.04642-0.15353z"/>
|
||||||
|
<path d="m-34.035 47.961q0-0.48201 0.16424-0.70695 0.16781-0.22851 0.47487-0.22851 0.32848 0 0.48201 0.23208 0.1571 0.23208 0.1571 0.70338 0 0.48558-0.16781 0.71052-0.16781 0.22494-0.4713 0.22494-0.32848 0-0.48558-0.23208-0.15353-0.23208-0.15353-0.70338zm0.26778 0q0 0.1571 0.01785 0.28564 0.02142 0.12854 0.06427 0.22137 0.04642 0.09283 0.11782 0.14639 0.07141 0.04999 0.17138 0.04999 0.18566 0 0.2785-0.16424 0.09283-0.16781 0.09283-0.53914 0-0.15353-0.02142-0.28206-0.01785-0.13211-0.06427-0.22494-0.04285-0.09283-0.11425-0.14282-0.07141-0.05356-0.17138-0.05356-0.18209 0-0.27849 0.16781-0.09283 0.16781-0.09283 0.53557z"/>
|
||||||
|
<path d="m-32.415 47.068h0.18209l0.04642 0.18923h0.01071q0.04999-0.10354 0.12854-0.16067 0.08212-0.0607 0.19637-0.0607 0.08212 0 0.18566 0.03213l-0.04999 0.26064q-0.09283-0.03213-0.16424-0.03213-0.11426 0-0.18566 0.06784-0.07141 0.06427-0.09283 0.17495v1.3139h-0.25707z"/>
|
||||||
|
<path d="m-30.314 48.936q0 0.34633-0.15353 0.51057-0.15353 0.16424-0.4463 0.16424-0.17852 0-0.29278-0.03213-0.11425-0.02856-0.18566-0.06784l0.07498-0.22137q0.07141 0.03213 0.1571 0.0607 0.08569 0.02856 0.21066 0.02856 0.2178 0 0.29635-0.1214 0.08212-0.1214 0.08212-0.40703v-0.13211h-0.01071q-0.05713 0.08212-0.14639 0.12854-0.08926 0.04641-0.22851 0.04641-0.28921 0-0.42488-0.22137-0.13568-0.22494-0.13568-0.70338 0-0.46059 0.17495-0.69624 0.17852-0.23565 0.52486-0.23565 0.16781 0 0.2892 0.03213t0.21423 0.07498zm-0.25707-1.6103q-0.10711-0.05713-0.27492-0.05713-0.18209 0-0.29278 0.16781-0.11068 0.16424-0.11068 0.52842 0 0.14996 0.01785 0.27849 0.01785 0.12497 0.0607 0.22137 0.04285 0.09283 0.10711 0.14639 0.06784 0.04999 0.16424 0.04999 0.13568 0 0.21423-0.07141t0.11425-0.21423z"/>
|
||||||
|
</g>
|
||||||
|
<g style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="lightweight, portable C library">
|
||||||
|
<path d="m-49.147 50.56q0 0.05637 0.01449 0.08052 0.0161 0.02416 0.04348 0.02416 0.03382 0 0.07891-0.01772l0.01127 0.09341q-0.02094 0.01288-0.05959 0.02094-0.03704 0.0081-0.06764 0.0081-0.0612 0-0.09985-0.03704-0.03704-0.03865-0.03704-0.13367v-0.97434h0.11595z"/>
|
||||||
|
<path d="m-48.878 49.946h0.11596v0.80524h-0.11596zm-0.02094-0.24479q0-0.03865 0.02094-0.06281 0.02255-0.02416 0.05798-0.02416t0.05798 0.02416q0.02416 0.02255 0.02416 0.06281 0 0.03865-0.02416 0.0612-0.02255 0.02094-0.05798 0.02094t-0.05798-0.02255q-0.02094-0.02255-0.02094-0.05959z"/>
|
||||||
|
<path d="m-48.041 50.789q0 0.15622-0.06925 0.2303-0.06925 0.07408-0.20131 0.07408-0.08052 0-0.13206-0.0145-0.05153-0.01288-0.08374-0.0306l0.03382-0.09985q0.03221 0.01449 0.07086 0.02738 0.03865 0.01288 0.09502 0.01288 0.09824 0 0.13367-0.05476 0.03704-0.05476 0.03704-0.18359v-0.05959h-0.0048q-0.02577 0.03704-0.06603 0.05798t-0.10307 0.02094q-0.13045 0-0.19165-0.09985-0.0612-0.10146-0.0612-0.31726 0-0.20775 0.07891-0.31404 0.08052-0.10629 0.23674-0.10629 0.07569 0 0.13045 0.01449 0.05476 0.01449 0.09663 0.03382zm-0.11595-0.72632q-0.04831-0.02577-0.12401-0.02577-0.08213 0-0.13206 0.07569-0.04992 0.07408-0.04992 0.23835 0 0.06764 0.0081 0.12562 0.0081 0.05637 0.02738 0.09985 0.01933 0.04187 0.04831 0.06603 0.0306 0.02255 0.07408 0.02255 0.0612 0 0.09663-0.03221t0.05154-0.09663z"/>
|
||||||
|
<path d="m-47.441 50.752v-0.48958q0-0.11273-0.02738-0.17071-0.02577-0.05959-0.10468-0.05959-0.05637 0-0.10307 0.04026-0.04509 0.04026-0.0612 0.10146v0.57816h-0.11595v-1.1273h0.11595v0.39779h0.0048q0.03221-0.04187 0.07891-0.06764 0.04832-0.02738 0.11918-0.02738 0.05315 0 0.0918 0.0145 0.04026 0.01449 0.06603 0.04992t0.03865 0.09502q0.01288 0.05798 0.01288 0.14494v0.52018z"/>
|
||||||
|
<path d="m-47.226 49.946h0.09824v-0.15944l0.11595-0.03704v0.19648h0.17393v0.10468h-0.17393v0.47992q0 0.07086 0.01611 0.10307 0.01772 0.0306 0.05637 0.0306 0.03221 0 0.05476-0.0064 0.02416-0.0081 0.05154-0.01933l0.02255 0.0918q-0.03543 0.01772-0.07891 0.02738-0.04187 0.01127-0.08858 0.01127-0.08052 0-0.11595-0.05154-0.03382-0.05315-0.03382-0.17071v-0.49603h-0.09824z"/>
|
||||||
|
<path d="m-46.272 49.946 0.14333 0.47026 0.02899 0.15461h0.0032l0.02416-0.15783 0.10951-0.46704h0.10951l-0.21418 0.82295h-0.06603l-0.16266-0.52824-0.02255-0.13528h-0.0032l-0.02255 0.13689-0.15783 0.52662h-0.06603l-0.22064-0.82295h0.12401l0.12401 0.46865 0.01933 0.15622h0.0032l0.02899-0.15944 0.13206-0.46543z"/>
|
||||||
|
<path d="m-45.286 50.697q-0.03865 0.03543-0.09824 0.05476t-0.12562 0.01933q-0.07569 0-0.13206-0.02899-0.05476-0.0306-0.0918-0.08535-0.03543-0.05637-0.05315-0.13367-0.01611-0.0773-0.01611-0.17393 0-0.20614 0.07569-0.31404t0.21419-0.1079q0.04509 0 0.08858 0.01127 0.04509 0.01127 0.08052 0.04509t0.05637 0.09502q0.02255 0.0612 0.02255 0.15944 0 0.02738-0.0032 0.05959-0.0016 0.0306-0.0048 0.06442h-0.40906q0 0.06925 0.01127 0.12562 0.01127 0.05637 0.03543 0.09663 0.02416 0.03865 0.0612 0.0612 0.03865 0.02094 0.09502 0.02094 0.04348 0 0.08535-0.0161 0.04348-0.01611 0.06603-0.03865zm-0.09019-0.43161q0.0032-0.12079-0.03382-0.17715-0.03704-0.05637-0.10146-0.05637-0.07408 0-0.11756 0.05637-0.04348 0.05637-0.05154 0.17715z"/>
|
||||||
|
<path d="m-45.084 49.946h0.11595v0.80524h-0.11595zm-0.02094-0.24479q0-0.03865 0.02094-0.06281 0.02255-0.02416 0.05798-0.02416t0.05798 0.02416q0.02416 0.02255 0.02416 0.06281 0 0.03865-0.02416 0.0612-0.02255 0.02094-0.05798 0.02094t-0.05798-0.02255q-0.02094-0.02255-0.02094-0.05959z"/>
|
||||||
|
<path d="m-44.247 50.789q0 0.15622-0.06925 0.2303-0.06925 0.07408-0.20131 0.07408-0.08052 0-0.13206-0.0145-0.05153-0.01288-0.08374-0.0306l0.03382-0.09985q0.03221 0.01449 0.07086 0.02738 0.03865 0.01288 0.09502 0.01288 0.09824 0 0.13367-0.05476 0.03704-0.05476 0.03704-0.18359v-0.05959h-0.0048q-0.02577 0.03704-0.06603 0.05798t-0.10307 0.02094q-0.13045 0-0.19165-0.09985-0.0612-0.10146-0.0612-0.31726 0-0.20775 0.07891-0.31404 0.08052-0.10629 0.23674-0.10629 0.07569 0 0.13045 0.01449 0.05476 0.01449 0.09663 0.03382zm-0.11595-0.72632q-0.04831-0.02577-0.12401-0.02577-0.08213 0-0.13206 0.07569-0.04993 0.07408-0.04993 0.23835 0 0.06764 0.0081 0.12562 0.0081 0.05637 0.02738 0.09985 0.01933 0.04187 0.04831 0.06603 0.0306 0.02255 0.07408 0.02255 0.0612 0 0.09663-0.03221t0.05154-0.09663z"/>
|
||||||
|
<path d="m-43.647 50.752v-0.48958q0-0.11273-0.02738-0.17071-0.02577-0.05959-0.10468-0.05959-0.05637 0-0.10307 0.04026-0.04509 0.04026-0.0612 0.10146v0.57816h-0.11595v-1.1273h0.11595v0.39779h0.0048q0.03221-0.04187 0.07891-0.06764 0.04831-0.02738 0.11918-0.02738 0.05315 0 0.0918 0.0145 0.04026 0.01449 0.06603 0.04992t0.03865 0.09502q0.01288 0.05798 0.01288 0.14494v0.52018z"/>
|
||||||
|
<path d="m-43.432 49.946h0.09824v-0.15944l0.11595-0.03704v0.19648h0.17393v0.10468h-0.17393v0.47992q0 0.07086 0.01611 0.10307 0.01771 0.0306 0.05637 0.0306 0.03221 0 0.05476-0.0064 0.02416-0.0081 0.05154-0.01933l0.02255 0.0918q-0.03543 0.01772-0.07891 0.02738-0.04187 0.01127-0.08858 0.01127-0.08052 0-0.11595-0.05154-0.03382-0.05315-0.03382-0.17071v-0.49603h-0.09824z"/>
|
||||||
|
<path d="m-42.945 50.682q0-0.04026 0.02255-0.06442 0.02416-0.02416 0.0612-0.02416 0.04187 0 0.06764 0.03382 0.02738 0.03382 0.02738 0.10629 0 0.05315-0.01449 0.09502-0.01288 0.04348-0.03543 0.07569-0.02094 0.03221-0.0467 0.05315-0.02577 0.02094-0.04993 0.0306l-0.04026-0.05476q0.02094-0.01127 0.03865-0.0306 0.01933-0.01772 0.0306-0.04026 0.01288-0.02255 0.01933-0.04831 0.0064-0.02416 0.0064-0.04831-0.03221 0.0097-0.05959-0.01288-0.02738-0.02255-0.02738-0.07086z"/>
|
||||||
|
<path d="m-42.373 49.946h0.08213l0.01771 0.08697h0.0064q0.05959-0.10629 0.18682-0.10629 0.12723 0 0.19004 0.09502 0.06442 0.09502 0.06442 0.31082 0 0.10146-0.02094 0.18359-0.02094 0.08052-0.05959 0.1385-0.03865 0.05637-0.09502 0.08696-0.05476 0.02899-0.1224 0.02899-0.0467 0-0.07408-0.0064-0.02738-0.0048-0.05959-0.02255v0.33176h-0.11595zm0.11595 0.67801q0.02255 0.01933 0.04992 0.0306 0.02899 0.01127 0.07569 0.01127 0.08535 0 0.13528-0.08697 0.04992-0.08696 0.04992-0.24801 0-0.06764-0.0097-0.1224-0.0081-0.05476-0.02738-0.09341-0.01933-0.04026-0.04992-0.0612-0.02899-0.02255-0.07247-0.02255-0.11756 0-0.15138 0.14333z"/>
|
||||||
|
<path d="m-41.707 50.349q0-0.21742 0.07408-0.31887 0.07569-0.10307 0.21419-0.10307 0.14816 0 0.21741 0.10468 0.07086 0.10468 0.07086 0.31726 0 0.21902-0.07569 0.32048t-0.21258 0.10146q-0.14816 0-0.21902-0.10468-0.06925-0.10468-0.06925-0.31726zm0.12079 0q0 0.07086 0.0081 0.12884 0.0097 0.05798 0.02899 0.09985 0.02094 0.04187 0.05315 0.06603 0.03221 0.02255 0.0773 0.02255 0.08375 0 0.12562-0.07408 0.04187-0.07569 0.04187-0.24318 0-0.06925-0.0097-0.12723-0.0081-0.05959-0.02899-0.10146-0.01933-0.04187-0.05154-0.06442-0.03221-0.02416-0.0773-0.02416-0.08213 0-0.12562 0.07569-0.04187 0.07569-0.04187 0.24157z"/>
|
||||||
|
<path d="m-40.977 49.946h0.08213l0.02094 0.08535h0.0048q0.02255-0.0467 0.05798-0.07247 0.03704-0.02738 0.08858-0.02738 0.03704 0 0.08375 0.01449l-0.02255 0.11756q-0.04187-0.01449-0.07408-0.01449-0.05154 0-0.08374 0.0306-0.03221 0.02899-0.04187 0.07891v0.59265h-0.11595z"/>
|
||||||
|
<path d="m-40.579 49.946h0.09824v-0.15944l0.11595-0.03704v0.19648h0.17393v0.10468h-0.17393v0.47992q0 0.07086 0.01611 0.10307 0.01772 0.0306 0.05637 0.0306 0.03221 0 0.05476-0.0064 0.02416-0.0081 0.05154-0.01933l0.02255 0.0918q-0.03543 0.01772-0.07891 0.02738-0.04187 0.01127-0.08858 0.01127-0.08052 0-0.11595-0.05154-0.03382-0.05315-0.03382-0.17071v-0.49603h-0.09824z"/>
|
||||||
|
<path d="m-40.063 49.995q0.0467-0.02899 0.11273-0.04509 0.06764-0.01611 0.14172-0.01611 0.06764 0 0.1079 0.02094 0.04187 0.01933 0.06442 0.05476 0.02416 0.03382 0.0306 0.07891 0.0081 0.04348 0.0081 0.0918 0 0.09663-0.0048 0.18842-0.0032 0.0918-0.0032 0.17393 0 0.0612 0.0032 0.11434 0.0048 0.05154 0.01611 0.09824h-0.08858l-0.02738-0.09502h-0.0064q-0.02416 0.04187-0.07086 0.07247t-0.12562 0.0306q-0.08697 0-0.14333-0.05959-0.05476-0.0612-0.05476-0.16749 0-0.06925 0.02255-0.11596 0.02416-0.0467 0.06603-0.07569 0.04348-0.02899 0.10146-0.04026 0.05959-0.01288 0.13206-0.01288 0.01611 0 0.03221 0 0.01611 0 0.03382 0.0016 0.0048-0.04993 0.0048-0.08858 0-0.0918-0.02738-0.12884-0.02738-0.03704-0.09985-0.03704-0.04509 0-0.09824 0.01449-0.05315 0.01288-0.08858 0.03382zm0.34947 0.38974q-0.0161-0.0016-0.03221-0.0016-0.01611-0.0016-0.03221-0.0016-0.03865 0-0.07569 0.0064t-0.06603 0.02255q-0.02899 0.0161-0.0467 0.04348-0.01611 0.02738-0.01611 0.06925 0 0.06442 0.0306 0.09985 0.03221 0.03543 0.08213 0.03543 0.06764 0 0.10468-0.03221 0.03704-0.03221 0.05153-0.07086z"/>
|
||||||
|
<path d="m-39.41 49.624h0.11595v0.38329h0.0048q0.06603-0.08052 0.17554-0.08052 0.12401 0 0.1852 0.09824 0.06281 0.09824 0.06281 0.31082 0 0.21741-0.08374 0.3237-0.08214 0.10629-0.23352 0.10629-0.07408 0-0.13528-0.0161-0.0612-0.01772-0.0918-0.04026zm0.11595 1.0098q0.02255 0.01288 0.05476 0.02094 0.03382 0.0064 0.07086 0.0064 0.08375 0 0.13206-0.07891 0.04993-0.08052 0.04993-0.2464 0-0.06925-0.0097-0.12401-0.0081-0.05637-0.02738-0.09663-0.01771-0.04026-0.04831-0.0612-0.02899-0.02255-0.07086-0.02255-0.05798 0-0.09663 0.03543-0.03704 0.03382-0.05476 0.09341z"/>
|
||||||
|
<path d="m-38.588 50.56q0 0.05637 0.01449 0.08052 0.0161 0.02416 0.04348 0.02416 0.03382 0 0.07891-0.01772l0.01127 0.09341q-0.02094 0.01288-0.05959 0.02094-0.03704 0.0081-0.06764 0.0081-0.0612 0-0.09985-0.03704-0.03704-0.03865-0.03704-0.13367v-0.97434h0.11595z"/>
|
||||||
|
<path d="m-37.856 50.697q-0.03865 0.03543-0.09824 0.05476t-0.12562 0.01933q-0.07569 0-0.13206-0.02899-0.05476-0.0306-0.0918-0.08535-0.03543-0.05637-0.05314-0.13367-0.01611-0.0773-0.01611-0.17393 0-0.20614 0.07569-0.31404t0.21419-0.1079q0.04509 0 0.08858 0.01127 0.04509 0.01127 0.08052 0.04509t0.05637 0.09502q0.02255 0.0612 0.02255 0.15944 0 0.02738-0.0032 0.05959-0.0016 0.0306-0.0048 0.06442h-0.40906q0 0.06925 0.01127 0.12562 0.01127 0.05637 0.03543 0.09663 0.02416 0.03865 0.0612 0.0612 0.03865 0.02094 0.09502 0.02094 0.04348 0 0.08536-0.0161 0.04348-0.01611 0.06603-0.03865zm-0.09019-0.43161q0.0032-0.12079-0.03382-0.17715-0.03704-0.05637-0.10146-0.05637-0.07408 0-0.11756 0.05637-0.04348 0.05637-0.05154 0.17715z"/>
|
||||||
|
<path d="m-36.734 50.708q-0.04026 0.03382-0.10146 0.04831t-0.12884 0.01449q-0.08535 0-0.15783-0.03221-0.07247-0.03221-0.12562-0.10146-0.05154-0.07086-0.08052-0.18198-0.02899-0.11112-0.02899-0.26734 0-0.16105 0.03221-0.27217 0.03382-0.11112 0.08858-0.18037t0.12562-0.09985q0.07247-0.0306 0.14816-0.0306 0.0773 0 0.12723 0.01127 0.05154 0.01127 0.08858 0.02738l-0.02899 0.10951q-0.03221-0.01772-0.07569-0.02738-0.04348-0.0097-0.09985-0.0097t-0.10629 0.02577q-0.04993 0.02416-0.08858 0.08052-0.03865 0.05476-0.0612 0.14494-0.02255 0.09019-0.02255 0.22064 0 0.23513 0.08052 0.3543 0.08052 0.11756 0.21419 0.11756 0.05476 0 0.09824-0.01449 0.04348-0.0161 0.07408-0.03704z"/>
|
||||||
|
<path d="m-36.176 50.56q0 0.05637 0.01449 0.08052 0.0161 0.02416 0.04348 0.02416 0.03382 0 0.07891-0.01772l0.01127 0.09341q-0.02094 0.01288-0.05959 0.02094-0.03704 0.0081-0.06764 0.0081-0.0612 0-0.09985-0.03704-0.03704-0.03865-0.03704-0.13367v-0.97434h0.11595z"/>
|
||||||
|
<path d="m-35.906 49.946h0.11595v0.80524h-0.11595zm-0.02094-0.24479q0-0.03865 0.02094-0.06281 0.02255-0.02416 0.05798-0.02416t0.05798 0.02416q0.02416 0.02255 0.02416 0.06281 0 0.03865-0.02416 0.0612-0.02255 0.02094-0.05798 0.02094t-0.05798-0.02255q-0.02094-0.02255-0.02094-0.05959z"/>
|
||||||
|
<path d="m-35.576 49.624h0.11596v0.38329h0.0048q0.06603-0.08052 0.17554-0.08052 0.12401 0 0.1852 0.09824 0.06281 0.09824 0.06281 0.31082 0 0.21741-0.08375 0.3237-0.08213 0.10629-0.23352 0.10629-0.07408 0-0.13528-0.0161-0.0612-0.01772-0.0918-0.04026zm0.11596 1.0098q0.02255 0.01288 0.05476 0.02094 0.03382 0.0064 0.07086 0.0064 0.08374 0 0.13206-0.07891 0.04993-0.08052 0.04993-0.2464 0-0.06925-0.0097-0.12401-0.0081-0.05637-0.02738-0.09663-0.01771-0.04026-0.04831-0.0612-0.02899-0.02255-0.07086-0.02255-0.05798 0-0.09663 0.03543-0.03704 0.03382-0.05476 0.09341z"/>
|
||||||
|
<path d="m-34.878 49.946h0.08213l0.02094 0.08535h0.0048q0.02255-0.0467 0.05798-0.07247 0.03704-0.02738 0.08858-0.02738 0.03704 0 0.08375 0.01449l-0.02255 0.11756q-0.04187-0.01449-0.07408-0.01449-0.05154 0-0.08374 0.0306-0.03221 0.02899-0.04187 0.07891v0.59265h-0.11595z"/>
|
||||||
|
<path d="m-34.446 49.995q0.0467-0.02899 0.11273-0.04509 0.06764-0.01611 0.14172-0.01611 0.06764 0 0.1079 0.02094 0.04187 0.01933 0.06442 0.05476 0.02416 0.03382 0.0306 0.07891 0.0081 0.04348 0.0081 0.0918 0 0.09663-0.0048 0.18842-0.0032 0.0918-0.0032 0.17393 0 0.0612 0.0032 0.11434 0.0048 0.05154 0.01611 0.09824h-0.08858l-0.02738-0.09502h-0.0064q-0.02416 0.04187-0.07086 0.07247t-0.12562 0.0306q-0.08696 0-0.14333-0.05959-0.05476-0.0612-0.05476-0.16749 0-0.06925 0.02255-0.11596 0.02416-0.0467 0.06603-0.07569 0.04348-0.02899 0.10146-0.04026 0.05959-0.01288 0.13206-0.01288 0.0161 0 0.03221 0t0.03382 0.0016q0.0048-0.04993 0.0048-0.08858 0-0.0918-0.02738-0.12884-0.02738-0.03704-0.09985-0.03704-0.04509 0-0.09824 0.01449-0.05315 0.01288-0.08858 0.03382zm0.34947 0.38974q-0.01611-0.0016-0.03221-0.0016-0.01611-0.0016-0.03221-0.0016-0.03865 0-0.07569 0.0064t-0.06603 0.02255q-0.02899 0.0161-0.0467 0.04348-0.01611 0.02738-0.01611 0.06925 0 0.06442 0.0306 0.09985 0.03221 0.03543 0.08214 0.03543 0.06764 0 0.10468-0.03221t0.05154-0.07086z"/>
|
||||||
|
<path d="m-33.793 49.946h0.08214l0.02094 0.08535h0.0048q0.02255-0.0467 0.05798-0.07247 0.03704-0.02738 0.08858-0.02738 0.03704 0 0.08375 0.01449l-0.02255 0.11756q-0.04187-0.01449-0.07408-0.01449-0.05154 0-0.08374 0.0306-0.03221 0.02899-0.04187 0.07891v0.59265h-0.11595z"/>
|
||||||
|
<path d="m-33.153 50.467 0.03382 0.15622h0.0081l0.02416-0.15622 0.1224-0.52018h0.11756l-0.19165 0.7231q-0.02255 0.08696-0.04509 0.16266-0.02255 0.07569-0.04992 0.13045-0.02577 0.05637-0.05959 0.08697-0.03221 0.03221-0.0773 0.03221t-0.07891-0.01449l0.01933-0.10951q0.02255 0.0081 0.04509 0.0032 0.02255-0.0048 0.04187-0.02738 0.02094-0.02255 0.03704-0.06764 0.01772-0.04348 0.0306-0.11434l-0.2609-0.80524h0.13206z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<g transform="matrix(4.0081 0 0 4.0081 -210.57 -224.31)" stroke-width=".4463" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="libwebsockets.org">
|
||||||
|
<g stroke-width=".4463">
|
||||||
|
<path d="m-52.015 48.429q0 0.12497 0.03213 0.17852 0.0357 0.05356 0.0964 0.05356 0.07498 0 0.17495-0.03927l0.02499 0.20709q-0.04642 0.02856-0.13211 0.04642-0.08212 0.01785-0.14996 0.01785-0.13568 0-0.22137-0.08212-0.08212-0.08569-0.08212-0.29635v-2.1601h0.25707z"/>
|
||||||
|
<path d="m-51.417 47.068h0.25707v1.7852h-0.25707zm-0.04642-0.54271q0-0.08569 0.04642-0.13925 0.04999-0.05356 0.12854-0.05356 0.07855 0 0.12854 0.05356 0.05356 0.04999 0.05356 0.13925 0 0.08569-0.05356 0.13568-0.04999 0.04642-0.12854 0.04642-0.07855 0-0.12854-0.04999-0.04642-0.04999-0.04642-0.13211z"/>
|
||||||
|
<path d="m-50.686 46.354h0.25707v0.84976h0.01071q0.14639-0.17852 0.38918-0.17852 0.27492 0 0.4106 0.2178 0.13925 0.2178 0.13925 0.6891 0 0.48201-0.18566 0.71766-0.18209 0.23565-0.51771 0.23565-0.16424 0-0.29992-0.03571-0.13568-0.03927-0.20352-0.08926zm0.25707 2.2387q0.04999 0.02856 0.1214 0.04641 0.07498 0.01428 0.1571 0.01428 0.18566 0 0.29278-0.17495 0.11068-0.17852 0.11068-0.54628 0-0.15353-0.02142-0.27492-0.01785-0.12496-0.0607-0.21423-0.03927-0.08926-0.10711-0.13568-0.06427-0.04999-0.1571-0.04999-0.12854 0-0.21423 0.07855-0.08212 0.07498-0.1214 0.20708z"/>
|
||||||
|
</g>
|
||||||
|
<path d="m-48.092 47.068 0.24993 0.91403 0.04284 0.29635h0.01428l0.0357-0.29992 0.16781-0.91046h0.38561l-0.43916 1.8031h-0.33562l-0.26778-0.99615-0.02856-0.22851h-0.02142l-0.02499 0.23565-0.25707 0.98901h-0.34633l-0.45702-1.8031h0.46059l0.1928 0.89618 0.03213 0.31777h0.01428l0.04642-0.32134 0.2178-0.89261z"/>
|
||||||
|
<path d="m-45.889 48.721q-0.08926 0.07855-0.24279 0.12854-0.15353 0.04999-0.32134 0.04999-0.18566 0-0.32134-0.06427-0.13211-0.06427-0.2178-0.18566-0.08569-0.1214-0.12854-0.29278-0.03927-0.17495-0.03927-0.39632 0-0.48201 0.18923-0.71052 0.1928-0.23208 0.532-0.23208 0.11425 0 0.22137 0.0357 0.10711 0.03213 0.18923 0.11425 0.08569 0.07855 0.13568 0.21423 0.05356 0.13211 0.05356 0.33562 0 0.07855-0.01071 0.16781-0.0071 0.08926-0.02499 0.1928h-0.86762q0.0071 0.22137 0.09283 0.33919 0.08569 0.11782 0.27492 0.11782 0.11425 0 0.20709-0.0357 0.0964-0.0357 0.14639-0.07498zm-0.55699-1.3389q-0.13568 0-0.20352 0.11068-0.06784 0.10711-0.07855 0.30349h0.49272q0.01071-0.20352-0.04284-0.30706-0.05356-0.10711-0.16781-0.10711z"/>
|
||||||
|
<path d="m-45.569 46.354h0.42488v0.82834h0.01071q0.12854-0.1571 0.36776-0.1571 0.2535 0 0.39275 0.21066 0.14282 0.21066 0.14282 0.67838 0 0.507-0.19994 0.74622-0.19994 0.23565-0.54628 0.23565-0.18923 0-0.3499-0.0357-0.1571-0.03571-0.24279-0.07855zm0.42488 2.1137q0.07498 0.03927 0.19638 0.03927 0.13568 0 0.20708-0.12854 0.07141-0.13211 0.07141-0.43916 0-0.27135-0.05713-0.39632-0.05713-0.12854-0.17852-0.12854-0.17852 0-0.23922 0.18566z"/>
|
||||||
|
<path d="m-43.386 48.379q0-0.07498-0.04999-0.12496-0.04642-0.05356-0.1214-0.0964-0.07498-0.04642-0.16067-0.09283-0.08212-0.04641-0.1571-0.11425-0.07498-0.06784-0.12496-0.16424-0.04642-0.0964-0.04642-0.24279 0-0.24993 0.13568-0.38561 0.13568-0.13568 0.39989-0.13568 0.1571 0 0.29635 0.0357 0.13925 0.03213 0.22137 0.08212l-0.09997 0.32848q-0.06784-0.02856-0.16424-0.05356-0.0964-0.02856-0.18923-0.02856-0.17495 0-0.17495 0.14639 0 0.06784 0.04642 0.11425 0.04999 0.04284 0.12496 0.08569 0.07498 0.04284 0.1571 0.08926 0.08569 0.04642 0.16067 0.11782 0.07498 0.06784 0.1214 0.16781 0.04999 0.09997 0.04999 0.24636 0 0.24636-0.14996 0.39632-0.14996 0.14996-0.4463 0.14996-0.14639 0-0.2892-0.0357-0.13925-0.0357-0.22494-0.09283l0.11782-0.34276q0.07498 0.04285 0.17138 0.07498 0.09997 0.03213 0.20709 0.03213 0.08212 0 0.13568-0.0357 0.05356-0.03928 0.05356-0.1214z"/>
|
||||||
|
<path d="m-42.802 47.961q0-0.47487 0.18566-0.70695 0.18566-0.23208 0.51771-0.23208 0.35704 0 0.532 0.23565 0.17495 0.23565 0.17495 0.70338 0 0.47844-0.18566 0.71052-0.18566 0.22851-0.52128 0.22851-0.70338 0-0.70338-0.93902zm0.43916 0q0 0.26778 0.0607 0.41417t0.20352 0.14639q0.13568 0 0.19994-0.12497 0.06784-0.12854 0.06784-0.43559 0-0.27492-0.0607-0.41774-0.0607-0.14282-0.20708-0.14282-0.12497 0-0.19638 0.12854-0.06784 0.12497-0.06784 0.43202z"/>
|
||||||
|
<path d="m-40.094 48.757q-0.08926 0.07141-0.21423 0.10711-0.12496 0.0357-0.24993 0.0357-0.18209 0-0.30706-0.06427-0.1214-0.06784-0.19994-0.18923-0.07855-0.12496-0.11425-0.29635-0.03213-0.17495-0.03213-0.38918 0-0.46773 0.16781-0.70338 0.16781-0.23565 0.49272-0.23565 0.16067 0 0.26064 0.02856 0.10354 0.02856 0.18209 0.07141l-0.09997 0.35347q-0.06427-0.03213-0.12497-0.04642-0.05713-0.01785-0.13925-0.01785-0.14996 0-0.22494 0.13211-0.07498 0.12854-0.07498 0.41774 0 0.24279 0.07498 0.39632 0.07855 0.15353 0.24636 0.15353 0.08926 0 0.14996-0.02142 0.06427-0.02499 0.11782-0.0607z"/>
|
||||||
|
<path d="m-39.374 48.114h-0.09997v0.73908h-0.42488v-2.4993h0.42488v1.4746l0.08569-0.04999 0.29635-0.71052h0.46059l-0.32848 0.70695-0.15353 0.1214 0.16781 0.1214 0.36418 0.83548h-0.47844z"/>
|
||||||
|
<path d="m-37.256 48.721q-0.08926 0.07855-0.24279 0.12854-0.15353 0.04999-0.32134 0.04999-0.18566 0-0.32134-0.06427-0.13211-0.06427-0.2178-0.18566-0.08569-0.1214-0.12854-0.29278-0.03927-0.17495-0.03927-0.39632 0-0.48201 0.18923-0.71052 0.1928-0.23208 0.532-0.23208 0.11425 0 0.22137 0.0357 0.10711 0.03213 0.18923 0.11425 0.08569 0.07855 0.13568 0.21423 0.05356 0.13211 0.05356 0.33562 0 0.07855-0.01071 0.16781-0.0071 0.08926-0.02499 0.1928h-0.86763q0.0071 0.22137 0.09283 0.33919 0.08569 0.11782 0.27492 0.11782 0.11425 0 0.20708-0.0357 0.0964-0.0357 0.14639-0.07498zm-0.55699-1.3389q-0.13568 0-0.20352 0.11068-0.06784 0.10711-0.07855 0.30349h0.49272q0.01071-0.20352-0.04284-0.30706-0.05356-0.10711-0.16781-0.10711z"/>
|
||||||
|
<path d="m-37.075 47.068h0.19637v-0.33562l0.42488-0.13211v0.46773h0.34633v0.37847h-0.34633v0.77836q0 0.15353 0.02856 0.2178 0.03213 0.06427 0.11068 0.06427 0.05356 0 0.0964-0.01071t0.09283-0.03213l0.05356 0.33919q-0.07855 0.03928-0.18209 0.06427-0.10354 0.02856-0.2178 0.02856-0.20352 0-0.30706-0.11782-0.09997-0.11782-0.09997-0.39632v-0.93546h-0.19637z"/>
|
||||||
|
<path d="m-35.297 48.379q0-0.07498-0.04999-0.12496-0.04641-0.05356-0.1214-0.0964-0.07498-0.04642-0.16067-0.09283-0.08212-0.04641-0.1571-0.11425-0.07498-0.06784-0.12496-0.16424-0.04642-0.0964-0.04642-0.24279 0-0.24993 0.13568-0.38561 0.13568-0.13568 0.39989-0.13568 0.1571 0 0.29635 0.0357 0.13925 0.03213 0.22137 0.08212l-0.09997 0.32848q-0.06784-0.02856-0.16424-0.05356-0.0964-0.02856-0.18923-0.02856-0.17495 0-0.17495 0.14639 0 0.06784 0.04642 0.11425 0.04999 0.04284 0.12497 0.08569 0.07498 0.04284 0.1571 0.08926 0.08569 0.04642 0.16067 0.11782 0.07498 0.06784 0.1214 0.16781 0.04999 0.09997 0.04999 0.24636 0 0.24636-0.14996 0.39632-0.14996 0.14996-0.4463 0.14996-0.14639 0-0.2892-0.0357-0.13925-0.0357-0.22494-0.09283l0.11782-0.34276q0.07498 0.04285 0.17138 0.07498 0.09997 0.03213 0.20708 0.03213 0.08212 0 0.13568-0.0357 0.05356-0.03928 0.05356-0.1214z"/>
|
||||||
|
<g stroke-width=".4463">
|
||||||
|
<path d="m-34.662 48.693q0-0.09997 0.04642-0.14996 0.04999-0.04999 0.13211-0.04999 0.08212 0 0.12854 0.04999 0.04999 0.04999 0.04999 0.14996 0 0.10354-0.04999 0.15353-0.04642 0.04999-0.12854 0.04999-0.08212 0-0.13211-0.04999-0.04642-0.04999-0.04642-0.15353z"/>
|
||||||
|
<path d="m-34.035 47.961q0-0.48201 0.16424-0.70695 0.16781-0.22851 0.47487-0.22851 0.32848 0 0.48201 0.23208 0.1571 0.23208 0.1571 0.70338 0 0.48558-0.16781 0.71052-0.16781 0.22494-0.4713 0.22494-0.32848 0-0.48558-0.23208-0.15353-0.23208-0.15353-0.70338zm0.26778 0q0 0.1571 0.01785 0.28564 0.02142 0.12854 0.06427 0.22137 0.04642 0.09283 0.11782 0.14639 0.07141 0.04999 0.17138 0.04999 0.18566 0 0.2785-0.16424 0.09283-0.16781 0.09283-0.53914 0-0.15353-0.02142-0.28206-0.01785-0.13211-0.06427-0.22494-0.04285-0.09283-0.11425-0.14282-0.07141-0.05356-0.17138-0.05356-0.18209 0-0.27849 0.16781-0.09283 0.16781-0.09283 0.53557z"/>
|
||||||
|
<path d="m-32.415 47.068h0.18209l0.04642 0.18923h0.01071q0.04999-0.10354 0.12854-0.16067 0.08212-0.0607 0.19637-0.0607 0.08212 0 0.18566 0.03213l-0.04999 0.26064q-0.09283-0.03213-0.16424-0.03213-0.11426 0-0.18566 0.06784-0.07141 0.06427-0.09283 0.17495v1.3139h-0.25707z"/>
|
||||||
|
<path d="m-30.314 48.936q0 0.34633-0.15353 0.51057-0.15353 0.16424-0.4463 0.16424-0.17852 0-0.29278-0.03213-0.11425-0.02856-0.18566-0.06784l0.07498-0.22137q0.07141 0.03213 0.1571 0.0607 0.08569 0.02856 0.21066 0.02856 0.2178 0 0.29635-0.1214 0.08212-0.1214 0.08212-0.40703v-0.13211h-0.01071q-0.05713 0.08212-0.14639 0.12854-0.08926 0.04641-0.22851 0.04641-0.28921 0-0.42488-0.22137-0.13568-0.22494-0.13568-0.70338 0-0.46059 0.17495-0.69624 0.17852-0.23565 0.52486-0.23565 0.16781 0 0.2892 0.03213t0.21423 0.07498zm-0.25707-1.6103q-0.10711-0.05713-0.27492-0.05713-0.18209 0-0.29278 0.16781-0.11068 0.16424-0.11068 0.52842 0 0.14996 0.01785 0.27849 0.01785 0.12497 0.0607 0.22137 0.04285 0.09283 0.10711 0.14639 0.06784 0.04999 0.16424 0.04999 0.13568 0 0.21423-0.07141t0.11425-0.21423z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(4.0081 0 0 4.0081 -210.57 -224.31)" stroke-width=".20131" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="lightweight, portable C library">
|
||||||
|
<path d="m-49.147 50.56q0 0.05637 0.01449 0.08052 0.0161 0.02416 0.04348 0.02416 0.03382 0 0.07891-0.01772l0.01127 0.09341q-0.02094 0.01288-0.05959 0.02094-0.03704 0.0081-0.06764 0.0081-0.0612 0-0.09985-0.03704-0.03704-0.03865-0.03704-0.13367v-0.97434h0.11595z"/>
|
||||||
|
<path d="m-48.878 49.946h0.11596v0.80524h-0.11596zm-0.02094-0.24479q0-0.03865 0.02094-0.06281 0.02255-0.02416 0.05798-0.02416t0.05798 0.02416q0.02416 0.02255 0.02416 0.06281 0 0.03865-0.02416 0.0612-0.02255 0.02094-0.05798 0.02094t-0.05798-0.02255q-0.02094-0.02255-0.02094-0.05959z"/>
|
||||||
|
<path d="m-48.041 50.789q0 0.15622-0.06925 0.2303-0.06925 0.07408-0.20131 0.07408-0.08052 0-0.13206-0.0145-0.05153-0.01288-0.08374-0.0306l0.03382-0.09985q0.03221 0.01449 0.07086 0.02738 0.03865 0.01288 0.09502 0.01288 0.09824 0 0.13367-0.05476 0.03704-0.05476 0.03704-0.18359v-0.05959h-0.0048q-0.02577 0.03704-0.06603 0.05798t-0.10307 0.02094q-0.13045 0-0.19165-0.09985-0.0612-0.10146-0.0612-0.31726 0-0.20775 0.07891-0.31404 0.08052-0.10629 0.23674-0.10629 0.07569 0 0.13045 0.01449 0.05476 0.01449 0.09663 0.03382zm-0.11595-0.72632q-0.04831-0.02577-0.12401-0.02577-0.08213 0-0.13206 0.07569-0.04992 0.07408-0.04992 0.23835 0 0.06764 0.0081 0.12562 0.0081 0.05637 0.02738 0.09985 0.01933 0.04187 0.04831 0.06603 0.0306 0.02255 0.07408 0.02255 0.0612 0 0.09663-0.03221t0.05154-0.09663z"/>
|
||||||
|
<path d="m-47.441 50.752v-0.48958q0-0.11273-0.02738-0.17071-0.02577-0.05959-0.10468-0.05959-0.05637 0-0.10307 0.04026-0.04509 0.04026-0.0612 0.10146v0.57816h-0.11595v-1.1273h0.11595v0.39779h0.0048q0.03221-0.04187 0.07891-0.06764 0.04832-0.02738 0.11918-0.02738 0.05315 0 0.0918 0.0145 0.04026 0.01449 0.06603 0.04992t0.03865 0.09502q0.01288 0.05798 0.01288 0.14494v0.52018z"/>
|
||||||
|
<path d="m-47.226 49.946h0.09824v-0.15944l0.11595-0.03704v0.19648h0.17393v0.10468h-0.17393v0.47992q0 0.07086 0.01611 0.10307 0.01772 0.0306 0.05637 0.0306 0.03221 0 0.05476-0.0064 0.02416-0.0081 0.05154-0.01933l0.02255 0.0918q-0.03543 0.01772-0.07891 0.02738-0.04187 0.01127-0.08858 0.01127-0.08052 0-0.11595-0.05154-0.03382-0.05315-0.03382-0.17071v-0.49603h-0.09824z"/>
|
||||||
|
<path d="m-46.272 49.946 0.14333 0.47026 0.02899 0.15461h0.0032l0.02416-0.15783 0.10951-0.46704h0.10951l-0.21418 0.82295h-0.06603l-0.16266-0.52824-0.02255-0.13528h-0.0032l-0.02255 0.13689-0.15783 0.52662h-0.06603l-0.22064-0.82295h0.12401l0.12401 0.46865 0.01933 0.15622h0.0032l0.02899-0.15944 0.13206-0.46543z"/>
|
||||||
|
<path d="m-45.286 50.697q-0.03865 0.03543-0.09824 0.05476t-0.12562 0.01933q-0.07569 0-0.13206-0.02899-0.05476-0.0306-0.0918-0.08535-0.03543-0.05637-0.05315-0.13367-0.01611-0.0773-0.01611-0.17393 0-0.20614 0.07569-0.31404t0.21419-0.1079q0.04509 0 0.08858 0.01127 0.04509 0.01127 0.08052 0.04509t0.05637 0.09502q0.02255 0.0612 0.02255 0.15944 0 0.02738-0.0032 0.05959-0.0016 0.0306-0.0048 0.06442h-0.40906q0 0.06925 0.01127 0.12562 0.01127 0.05637 0.03543 0.09663 0.02416 0.03865 0.0612 0.0612 0.03865 0.02094 0.09502 0.02094 0.04348 0 0.08535-0.0161 0.04348-0.01611 0.06603-0.03865zm-0.09019-0.43161q0.0032-0.12079-0.03382-0.17715-0.03704-0.05637-0.10146-0.05637-0.07408 0-0.11756 0.05637-0.04348 0.05637-0.05154 0.17715z"/>
|
||||||
|
<path d="m-45.084 49.946h0.11595v0.80524h-0.11595zm-0.02094-0.24479q0-0.03865 0.02094-0.06281 0.02255-0.02416 0.05798-0.02416t0.05798 0.02416q0.02416 0.02255 0.02416 0.06281 0 0.03865-0.02416 0.0612-0.02255 0.02094-0.05798 0.02094t-0.05798-0.02255q-0.02094-0.02255-0.02094-0.05959z"/>
|
||||||
|
<path d="m-44.247 50.789q0 0.15622-0.06925 0.2303-0.06925 0.07408-0.20131 0.07408-0.08052 0-0.13206-0.0145-0.05153-0.01288-0.08374-0.0306l0.03382-0.09985q0.03221 0.01449 0.07086 0.02738 0.03865 0.01288 0.09502 0.01288 0.09824 0 0.13367-0.05476 0.03704-0.05476 0.03704-0.18359v-0.05959h-0.0048q-0.02577 0.03704-0.06603 0.05798t-0.10307 0.02094q-0.13045 0-0.19165-0.09985-0.0612-0.10146-0.0612-0.31726 0-0.20775 0.07891-0.31404 0.08052-0.10629 0.23674-0.10629 0.07569 0 0.13045 0.01449 0.05476 0.01449 0.09663 0.03382zm-0.11595-0.72632q-0.04831-0.02577-0.12401-0.02577-0.08213 0-0.13206 0.07569-0.04993 0.07408-0.04993 0.23835 0 0.06764 0.0081 0.12562 0.0081 0.05637 0.02738 0.09985 0.01933 0.04187 0.04831 0.06603 0.0306 0.02255 0.07408 0.02255 0.0612 0 0.09663-0.03221t0.05154-0.09663z"/>
|
||||||
|
<path d="m-43.647 50.752v-0.48958q0-0.11273-0.02738-0.17071-0.02577-0.05959-0.10468-0.05959-0.05637 0-0.10307 0.04026-0.04509 0.04026-0.0612 0.10146v0.57816h-0.11595v-1.1273h0.11595v0.39779h0.0048q0.03221-0.04187 0.07891-0.06764 0.04831-0.02738 0.11918-0.02738 0.05315 0 0.0918 0.0145 0.04026 0.01449 0.06603 0.04992t0.03865 0.09502q0.01288 0.05798 0.01288 0.14494v0.52018z"/>
|
||||||
|
<path d="m-43.432 49.946h0.09824v-0.15944l0.11595-0.03704v0.19648h0.17393v0.10468h-0.17393v0.47992q0 0.07086 0.01611 0.10307 0.01771 0.0306 0.05637 0.0306 0.03221 0 0.05476-0.0064 0.02416-0.0081 0.05154-0.01933l0.02255 0.0918q-0.03543 0.01772-0.07891 0.02738-0.04187 0.01127-0.08858 0.01127-0.08052 0-0.11595-0.05154-0.03382-0.05315-0.03382-0.17071v-0.49603h-0.09824z"/>
|
||||||
|
<path d="m-42.945 50.682q0-0.04026 0.02255-0.06442 0.02416-0.02416 0.0612-0.02416 0.04187 0 0.06764 0.03382 0.02738 0.03382 0.02738 0.10629 0 0.05315-0.01449 0.09502-0.01288 0.04348-0.03543 0.07569-0.02094 0.03221-0.0467 0.05315-0.02577 0.02094-0.04993 0.0306l-0.04026-0.05476q0.02094-0.01127 0.03865-0.0306 0.01933-0.01772 0.0306-0.04026 0.01288-0.02255 0.01933-0.04831 0.0064-0.02416 0.0064-0.04831-0.03221 0.0097-0.05959-0.01288-0.02738-0.02255-0.02738-0.07086z"/>
|
||||||
|
<path d="m-42.373 49.946h0.08213l0.01771 0.08697h0.0064q0.05959-0.10629 0.18682-0.10629 0.12723 0 0.19004 0.09502 0.06442 0.09502 0.06442 0.31082 0 0.10146-0.02094 0.18359-0.02094 0.08052-0.05959 0.1385-0.03865 0.05637-0.09502 0.08696-0.05476 0.02899-0.1224 0.02899-0.0467 0-0.07408-0.0064-0.02738-0.0048-0.05959-0.02255v0.33176h-0.11595zm0.11595 0.67801q0.02255 0.01933 0.04992 0.0306 0.02899 0.01127 0.07569 0.01127 0.08535 0 0.13528-0.08697 0.04992-0.08696 0.04992-0.24801 0-0.06764-0.0097-0.1224-0.0081-0.05476-0.02738-0.09341-0.01933-0.04026-0.04992-0.0612-0.02899-0.02255-0.07247-0.02255-0.11756 0-0.15138 0.14333z"/>
|
||||||
|
<path d="m-41.707 50.349q0-0.21742 0.07408-0.31887 0.07569-0.10307 0.21419-0.10307 0.14816 0 0.21741 0.10468 0.07086 0.10468 0.07086 0.31726 0 0.21902-0.07569 0.32048t-0.21258 0.10146q-0.14816 0-0.21902-0.10468-0.06925-0.10468-0.06925-0.31726zm0.12079 0q0 0.07086 0.0081 0.12884 0.0097 0.05798 0.02899 0.09985 0.02094 0.04187 0.05315 0.06603 0.03221 0.02255 0.0773 0.02255 0.08375 0 0.12562-0.07408 0.04187-0.07569 0.04187-0.24318 0-0.06925-0.0097-0.12723-0.0081-0.05959-0.02899-0.10146-0.01933-0.04187-0.05154-0.06442-0.03221-0.02416-0.0773-0.02416-0.08213 0-0.12562 0.07569-0.04187 0.07569-0.04187 0.24157z"/>
|
||||||
|
<path d="m-40.977 49.946h0.08213l0.02094 0.08535h0.0048q0.02255-0.0467 0.05798-0.07247 0.03704-0.02738 0.08858-0.02738 0.03704 0 0.08375 0.01449l-0.02255 0.11756q-0.04187-0.01449-0.07408-0.01449-0.05154 0-0.08374 0.0306-0.03221 0.02899-0.04187 0.07891v0.59265h-0.11595z"/>
|
||||||
|
<path d="m-40.579 49.946h0.09824v-0.15944l0.11595-0.03704v0.19648h0.17393v0.10468h-0.17393v0.47992q0 0.07086 0.01611 0.10307 0.01772 0.0306 0.05637 0.0306 0.03221 0 0.05476-0.0064 0.02416-0.0081 0.05154-0.01933l0.02255 0.0918q-0.03543 0.01772-0.07891 0.02738-0.04187 0.01127-0.08858 0.01127-0.08052 0-0.11595-0.05154-0.03382-0.05315-0.03382-0.17071v-0.49603h-0.09824z"/>
|
||||||
|
<path d="m-40.063 49.995q0.0467-0.02899 0.11273-0.04509 0.06764-0.01611 0.14172-0.01611 0.06764 0 0.1079 0.02094 0.04187 0.01933 0.06442 0.05476 0.02416 0.03382 0.0306 0.07891 0.0081 0.04348 0.0081 0.0918 0 0.09663-0.0048 0.18842-0.0032 0.0918-0.0032 0.17393 0 0.0612 0.0032 0.11434 0.0048 0.05154 0.01611 0.09824h-0.08858l-0.02738-0.09502h-0.0064q-0.02416 0.04187-0.07086 0.07247t-0.12562 0.0306q-0.08697 0-0.14333-0.05959-0.05476-0.0612-0.05476-0.16749 0-0.06925 0.02255-0.11596 0.02416-0.0467 0.06603-0.07569 0.04348-0.02899 0.10146-0.04026 0.05959-0.01288 0.13206-0.01288 0.01611 0 0.03221 0 0.01611 0 0.03382 0.0016 0.0048-0.04993 0.0048-0.08858 0-0.0918-0.02738-0.12884-0.02738-0.03704-0.09985-0.03704-0.04509 0-0.09824 0.01449-0.05315 0.01288-0.08858 0.03382zm0.34947 0.38974q-0.0161-0.0016-0.03221-0.0016-0.01611-0.0016-0.03221-0.0016-0.03865 0-0.07569 0.0064t-0.06603 0.02255q-0.02899 0.0161-0.0467 0.04348-0.01611 0.02738-0.01611 0.06925 0 0.06442 0.0306 0.09985 0.03221 0.03543 0.08213 0.03543 0.06764 0 0.10468-0.03221 0.03704-0.03221 0.05153-0.07086z"/>
|
||||||
|
<path d="m-39.41 49.624h0.11595v0.38329h0.0048q0.06603-0.08052 0.17554-0.08052 0.12401 0 0.1852 0.09824 0.06281 0.09824 0.06281 0.31082 0 0.21741-0.08374 0.3237-0.08214 0.10629-0.23352 0.10629-0.07408 0-0.13528-0.0161-0.0612-0.01772-0.0918-0.04026zm0.11595 1.0098q0.02255 0.01288 0.05476 0.02094 0.03382 0.0064 0.07086 0.0064 0.08375 0 0.13206-0.07891 0.04993-0.08052 0.04993-0.2464 0-0.06925-0.0097-0.12401-0.0081-0.05637-0.02738-0.09663-0.01771-0.04026-0.04831-0.0612-0.02899-0.02255-0.07086-0.02255-0.05798 0-0.09663 0.03543-0.03704 0.03382-0.05476 0.09341z"/>
|
||||||
|
<path d="m-38.588 50.56q0 0.05637 0.01449 0.08052 0.0161 0.02416 0.04348 0.02416 0.03382 0 0.07891-0.01772l0.01127 0.09341q-0.02094 0.01288-0.05959 0.02094-0.03704 0.0081-0.06764 0.0081-0.0612 0-0.09985-0.03704-0.03704-0.03865-0.03704-0.13367v-0.97434h0.11595z"/>
|
||||||
|
<path d="m-37.856 50.697q-0.03865 0.03543-0.09824 0.05476t-0.12562 0.01933q-0.07569 0-0.13206-0.02899-0.05476-0.0306-0.0918-0.08535-0.03543-0.05637-0.05314-0.13367-0.01611-0.0773-0.01611-0.17393 0-0.20614 0.07569-0.31404t0.21419-0.1079q0.04509 0 0.08858 0.01127 0.04509 0.01127 0.08052 0.04509t0.05637 0.09502q0.02255 0.0612 0.02255 0.15944 0 0.02738-0.0032 0.05959-0.0016 0.0306-0.0048 0.06442h-0.40906q0 0.06925 0.01127 0.12562 0.01127 0.05637 0.03543 0.09663 0.02416 0.03865 0.0612 0.0612 0.03865 0.02094 0.09502 0.02094 0.04348 0 0.08536-0.0161 0.04348-0.01611 0.06603-0.03865zm-0.09019-0.43161q0.0032-0.12079-0.03382-0.17715-0.03704-0.05637-0.10146-0.05637-0.07408 0-0.11756 0.05637-0.04348 0.05637-0.05154 0.17715z"/>
|
||||||
|
<path d="m-36.734 50.708q-0.04026 0.03382-0.10146 0.04831t-0.12884 0.01449q-0.08535 0-0.15783-0.03221-0.07247-0.03221-0.12562-0.10146-0.05154-0.07086-0.08052-0.18198-0.02899-0.11112-0.02899-0.26734 0-0.16105 0.03221-0.27217 0.03382-0.11112 0.08858-0.18037t0.12562-0.09985q0.07247-0.0306 0.14816-0.0306 0.0773 0 0.12723 0.01127 0.05154 0.01127 0.08858 0.02738l-0.02899 0.10951q-0.03221-0.01772-0.07569-0.02738-0.04348-0.0097-0.09985-0.0097t-0.10629 0.02577q-0.04993 0.02416-0.08858 0.08052-0.03865 0.05476-0.0612 0.14494-0.02255 0.09019-0.02255 0.22064 0 0.23513 0.08052 0.3543 0.08052 0.11756 0.21419 0.11756 0.05476 0 0.09824-0.01449 0.04348-0.0161 0.07408-0.03704z"/>
|
||||||
|
<path d="m-36.176 50.56q0 0.05637 0.01449 0.08052 0.0161 0.02416 0.04348 0.02416 0.03382 0 0.07891-0.01772l0.01127 0.09341q-0.02094 0.01288-0.05959 0.02094-0.03704 0.0081-0.06764 0.0081-0.0612 0-0.09985-0.03704-0.03704-0.03865-0.03704-0.13367v-0.97434h0.11595z"/>
|
||||||
|
<path d="m-35.906 49.946h0.11595v0.80524h-0.11595zm-0.02094-0.24479q0-0.03865 0.02094-0.06281 0.02255-0.02416 0.05798-0.02416t0.05798 0.02416q0.02416 0.02255 0.02416 0.06281 0 0.03865-0.02416 0.0612-0.02255 0.02094-0.05798 0.02094t-0.05798-0.02255q-0.02094-0.02255-0.02094-0.05959z"/>
|
||||||
|
<path d="m-35.576 49.624h0.11596v0.38329h0.0048q0.06603-0.08052 0.17554-0.08052 0.12401 0 0.1852 0.09824 0.06281 0.09824 0.06281 0.31082 0 0.21741-0.08375 0.3237-0.08213 0.10629-0.23352 0.10629-0.07408 0-0.13528-0.0161-0.0612-0.01772-0.0918-0.04026zm0.11596 1.0098q0.02255 0.01288 0.05476 0.02094 0.03382 0.0064 0.07086 0.0064 0.08374 0 0.13206-0.07891 0.04993-0.08052 0.04993-0.2464 0-0.06925-0.0097-0.12401-0.0081-0.05637-0.02738-0.09663-0.01771-0.04026-0.04831-0.0612-0.02899-0.02255-0.07086-0.02255-0.05798 0-0.09663 0.03543-0.03704 0.03382-0.05476 0.09341z"/>
|
||||||
|
<path d="m-34.878 49.946h0.08213l0.02094 0.08535h0.0048q0.02255-0.0467 0.05798-0.07247 0.03704-0.02738 0.08858-0.02738 0.03704 0 0.08375 0.01449l-0.02255 0.11756q-0.04187-0.01449-0.07408-0.01449-0.05154 0-0.08374 0.0306-0.03221 0.02899-0.04187 0.07891v0.59265h-0.11595z"/>
|
||||||
|
<path d="m-34.446 49.995q0.0467-0.02899 0.11273-0.04509 0.06764-0.01611 0.14172-0.01611 0.06764 0 0.1079 0.02094 0.04187 0.01933 0.06442 0.05476 0.02416 0.03382 0.0306 0.07891 0.0081 0.04348 0.0081 0.0918 0 0.09663-0.0048 0.18842-0.0032 0.0918-0.0032 0.17393 0 0.0612 0.0032 0.11434 0.0048 0.05154 0.01611 0.09824h-0.08858l-0.02738-0.09502h-0.0064q-0.02416 0.04187-0.07086 0.07247t-0.12562 0.0306q-0.08696 0-0.14333-0.05959-0.05476-0.0612-0.05476-0.16749 0-0.06925 0.02255-0.11596 0.02416-0.0467 0.06603-0.07569 0.04348-0.02899 0.10146-0.04026 0.05959-0.01288 0.13206-0.01288 0.0161 0 0.03221 0t0.03382 0.0016q0.0048-0.04993 0.0048-0.08858 0-0.0918-0.02738-0.12884-0.02738-0.03704-0.09985-0.03704-0.04509 0-0.09824 0.01449-0.05315 0.01288-0.08858 0.03382zm0.34947 0.38974q-0.01611-0.0016-0.03221-0.0016-0.01611-0.0016-0.03221-0.0016-0.03865 0-0.07569 0.0064t-0.06603 0.02255q-0.02899 0.0161-0.0467 0.04348-0.01611 0.02738-0.01611 0.06925 0 0.06442 0.0306 0.09985 0.03221 0.03543 0.08214 0.03543 0.06764 0 0.10468-0.03221t0.05154-0.07086z"/>
|
||||||
|
<path d="m-33.793 49.946h0.08214l0.02094 0.08535h0.0048q0.02255-0.0467 0.05798-0.07247 0.03704-0.02738 0.08858-0.02738 0.03704 0 0.08375 0.01449l-0.02255 0.11756q-0.04187-0.01449-0.07408-0.01449-0.05154 0-0.08374 0.0306-0.03221 0.02899-0.04187 0.07891v0.59265h-0.11595z"/>
|
||||||
|
<path d="m-33.153 50.467 0.03382 0.15622h0.0081l0.02416-0.15622 0.1224-0.52018h0.11756l-0.19165 0.7231q-0.02255 0.08696-0.04509 0.16266-0.02255 0.07569-0.04992 0.13045-0.02577 0.05637-0.05959 0.08697-0.03221 0.03221-0.0773 0.03221t-0.07891-0.01449l0.01933-0.10951q0.02255 0.0081 0.04509 0.0032 0.02255-0.0048 0.04187-0.02738 0.02094-0.02255 0.03704-0.06764 0.01772-0.04348 0.0306-0.11434l-0.2609-0.80524h0.13206z"/>
|
||||||
|
</g>
|
||||||
|
<path d="m-435.92-23.597c0.28617-0.34918 0.57227-0.69834 0.85837-1.0475 0.42677 0.47526 0.85355 0.95052 1.2803 1.4258 0.76622 0.0048 1.5325 0.01002 2.2987 0.01443-0.82927-0.91657-1.6586-1.8331-2.4878-2.7497 0.40254-0.45586 0.80503-0.91173 1.2076-1.3676 0.78562 0.91658 1.5713 1.8332 2.3569 2.7497-4e-3 -0.87778-8e-3 -1.7556-0.0161-2.6333-0.40253-0.45101-0.80501-0.90202-1.2075-1.353 0.28858-0.42545 0.99829-0.86377 0.3475-1.2606-1.4591-1.6118-2.9183-3.2236-4.3774-4.8354-3.0679-0.01042-6.1393 0.04092-9.205-0.0084-0.72986-0.06429-1.6392-0.29547-1.8065-1.1337-0.35271-1.09 0.84574-2.3762 1.9465-1.8649 0.76081 0.14726 0.44105 1.6835-0.23166 1.1743 0.69856-1.0262-1.2808-0.90972-0.72049 0.09824 0.38397 0.88195 1.783 1.0275 2.3349 0.22513 0.57404-0.92504-0.20641-1.9788-1.0842-2.3446-0.87836-0.41949-1.9686-0.31147-2.7028 0.34337-1.0973 0.83626-1.6281 2.4707-0.91191 3.7193 0.4168 0.93386 1.3405 1.5318 2.3429 1.6481 1.343 0.16782 2.7026 0.06445 4.0539 0.09323h5.3734c1.0184 1.13 2.0368 2.2599 3.0553 3.3899-0.91656 1.0136-1.8331 2.0271-2.7497 3.0407-0.66422-0.85695-1.6664-1.5082-2.0708-2.5299-0.32706-1.1972 1.4194-2.1305 2.2518-1.2247 0.79933 0.44227-0.0473 1.8554-0.62433 1.0813 0.46733-0.15836 0.67752-0.90508-0.0577-0.86727-0.86169 0.32798-0.49311 1.6295 0.25772 1.8808 0.71628 0.34674 1.6137-0.30285 1.5227-1.0869 0.0733-1.1334-0.75524-2.3676-1.9525-2.4204-1.2813-0.24958-2.727 0.4999-3.0402 1.8142-0.43151 1.1314 0.27896 2.2662 1.0551 3.0447 0.91076 0.98537 1.8001 1.9916 2.7018 2.985z" fill="#f00"/>
|
||||||
|
<path d="m-428.86-22.458c8e-3 -2.1947 0.012-4.3894 0.0201-6.5841-1.356-1.553-2.7839-3.046-4.0921-4.6391-0.4374-0.54095-0.77164-1.181-0.74606-1.8954-0.036-1.3281 0.79082-2.6298 2.0264-3.1348 0.95151-0.42136 2.0903-0.46194 3.022 0.03768 1.2998 0.66198 1.9155 2.4493 1.2087 3.7417-0.54185 0.79964-1.9325 0.78325-2.3809-0.10621-0.43247-0.56653-0.40691-1.7268 0.41575-1.8879 0.66914-0.01363 0.83223 0.96617 0.0962 1.0053-0.16353 0.63656 1.1345 0.49025 1.0924-0.18221 0.16593-0.92802-0.8623-1.6839-1.7291-1.5091-0.97624 0.09675-1.834 1.1261-1.4963 2.1064 0.35552 0.96342 1.2138 1.6073 1.8524 2.3761 1.0266 1.1181 2.05 2.2391 3.0765 3.3574-8e-3 2.445-0.012 4.89-0.0201 7.335-0.78189-0.0068-1.5639-0.01403-2.3458-0.02044z"/>
|
||||||
|
<path d="m-429.09-21.883-6.584 0.02044c-1.5531-1.356-3.0461-2.7839-4.6392-4.092-0.54093-0.43739-1.181-0.77164-1.8954-0.74605-1.3281-0.03447-2.6298 0.79084-3.1348 2.0263-0.42133 0.95153-0.46193 2.0903 0.036 3.0221 0.66201 1.2998 2.4493 1.9155 3.7417 1.2087 0.79964-0.54184 0.78325-1.9325-0.10621-2.381-0.56654-0.43248-1.7268-0.40688-1.8879 0.41576-0.012 0.66918 0.96618 0.83223 1.0053 0.09607 0.63656-0.16373 0.49027 1.1345-0.18236 1.0924-0.92803 0.16585-1.6839-0.86229-1.5092-1.7291 0.0966-0.97624 1.1261-1.834 2.1064-1.4963 0.96341 0.35556 1.6073 1.2139 2.376 1.8524 1.1181 1.0266 2.2391 2.05 3.3574 3.0765l9.8442-0.02044c-1.143-0.9713-1.4343-1.4219-2.5296-2.3458z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 48 KiB |
128
mount-origin/lws-common.js
Normal file
128
mount-origin/lws-common.js
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
/*
|
||||||
|
* This section around grayOut came from here:
|
||||||
|
* http://www.codingforums.com/archive/index.php/t-151720.html
|
||||||
|
* Assumed public domain
|
||||||
|
*
|
||||||
|
* Init like this in your main html script, this also reapplies the gray
|
||||||
|
*
|
||||||
|
* lws_gray_out(true,{'zindex':'499'});
|
||||||
|
*
|
||||||
|
* To remove the gray
|
||||||
|
*
|
||||||
|
* lws_gray_out(false);
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function gsize(ptype)
|
||||||
|
{
|
||||||
|
var h = document.compatMode === "CSS1Compat" &&
|
||||||
|
!window.opera ?
|
||||||
|
document.documentElement.clientHeight :
|
||||||
|
document.body.clientHeight;
|
||||||
|
var w = document.compatMode === "CSS1Compat" &&
|
||||||
|
!window.opera ?
|
||||||
|
document.documentElement.clientWidth :
|
||||||
|
document.body.clientWidth;
|
||||||
|
var pageWidth, pageHeight, t;
|
||||||
|
|
||||||
|
if (document.body &&
|
||||||
|
(document.body.scrollWidth || document.body.scrollHeight)) {
|
||||||
|
t = document.body.scrollWidth;
|
||||||
|
pageWidth = (w > t) ? ("" + w + "px") : ("" + (t) + "px");
|
||||||
|
t = document.body.scrollHeight;
|
||||||
|
pageHeight = (h > t) ? ("" + h + "px") : ("" + (t) + "px");
|
||||||
|
} else if (document.body.offsetWidth) {
|
||||||
|
t = document.body.offsetWidth;
|
||||||
|
pageWidth = (w > t) ? ("" + w + "px") : ("" + (t) + "px");
|
||||||
|
t = document.body.offsetHeight;
|
||||||
|
pageHeight =(h > t) ? ("" + h + "px") : ("" + (t) + "px");
|
||||||
|
} else {
|
||||||
|
pageWidth = "100%";
|
||||||
|
pageHeight = "100%";
|
||||||
|
}
|
||||||
|
return (ptype === 1) ? pageWidth : pageHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addEvent( obj, type, fn ) {
|
||||||
|
if ( obj.attachEvent ) {
|
||||||
|
obj["e" + type + fn] = fn;
|
||||||
|
obj[type+fn] = function() { obj["e" + type + fn]( window.event );};
|
||||||
|
obj.attachEvent("on" + type, obj[type + fn]);
|
||||||
|
} else
|
||||||
|
obj.addEventListener(type, fn, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeEvent( obj, type, fn ) {
|
||||||
|
if ( obj.detachEvent ) {
|
||||||
|
obj.detachEvent("on" + type, obj[type + fn]);
|
||||||
|
obj[type + fn] = null;
|
||||||
|
} else
|
||||||
|
obj.removeEventListener(type, fn, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function lws_gray_out(vis, _options) {
|
||||||
|
|
||||||
|
var options = _options || {};
|
||||||
|
var zindex = options.zindex || 50;
|
||||||
|
var opacity = options.opacity || 70;
|
||||||
|
var opaque = (opacity / 100);
|
||||||
|
var bgcolor = options.bgcolor || "#000000";
|
||||||
|
var dark = document.getElementById("darkenScreenObject");
|
||||||
|
|
||||||
|
if (!dark) {
|
||||||
|
var tbody = document.getElementsByTagName("body")[0];
|
||||||
|
var tnode = document.createElement("div");
|
||||||
|
tnode.style.position = "absolute";
|
||||||
|
tnode.style.top = "0px";
|
||||||
|
tnode.style.left = "0px";
|
||||||
|
tnode.style.overflow = "hidden";
|
||||||
|
tnode.style.display ="none";
|
||||||
|
tnode.id = "darkenScreenObject";
|
||||||
|
tbody.appendChild(tnode);
|
||||||
|
dark = document.getElementById("darkenScreenObject");
|
||||||
|
}
|
||||||
|
if (vis) {
|
||||||
|
dark.style.opacity = opaque;
|
||||||
|
dark.style.MozOpacity = opaque;
|
||||||
|
// dark.style.filter ='alpha(opacity='+opacity+')';
|
||||||
|
dark.style.zIndex = zindex;
|
||||||
|
dark.style.backgroundColor = bgcolor;
|
||||||
|
dark.style.width = gsize(1);
|
||||||
|
dark.style.height = gsize(0);
|
||||||
|
dark.style.display = "block";
|
||||||
|
addEvent(window, "resize",
|
||||||
|
function() {
|
||||||
|
dark.style.height = gsize(0);
|
||||||
|
dark.style.width = gsize(1);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
dark.style.display = "none";
|
||||||
|
removeEvent(window, "resize",
|
||||||
|
function() {
|
||||||
|
dark.style.height = gsize(0);
|
||||||
|
dark.style.width = gsize(1);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* end of grayOut related stuff
|
||||||
|
*/
|
||||||
|
|
||||||
|
function new_ws(urlpath, protocol)
|
||||||
|
{
|
||||||
|
if (typeof MozWebSocket != "undefined")
|
||||||
|
return new MozWebSocket(urlpath, protocol);
|
||||||
|
|
||||||
|
return new WebSocket(urlpath, protocol);
|
||||||
|
}
|
||||||
|
|
||||||
|
function lws_san(s)
|
||||||
|
{
|
||||||
|
if (s.search("<") !== -1)
|
||||||
|
return "invalid string";
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
53
mount-origin/strict-csp.svg
Normal file
53
mount-origin/strict-csp.svg
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="24.78mm" height="24.78mm" version="1.1" viewBox="0 0 24.780247 24.780247" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="linearGradient955" x1="66.618" x2="82.588" y1="81.176" y2="64.828" gradientTransform="matrix(.82538 0 0 .82538 -392 -92.399)" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#0aa70b" offset="0"/>
|
||||||
|
<stop stop-color="#3bff39" offset="1"/>
|
||||||
|
</linearGradient>
|
||||||
|
<filter id="filter945" x="-.0516" y="-.0516" width="1.1032" height="1.1032" color-interpolation-filters="sRGB">
|
||||||
|
<feGaussianBlur stdDeviation="0.58510713"/>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
<g transform="translate(342.15 43.638)">
|
||||||
|
<circle transform="matrix(.82538 0 0 .82538 -392 -92.399)" cx="75.406" cy="74.089" r="13.607" filter="url(#filter945)" stroke="#000" stroke-linecap="round" stroke-width="1.565"/>
|
||||||
|
<circle cx="-330.23" cy="-31.716" r="11.231" fill="url(#linearGradient955)" stroke="#000" stroke-linecap="round" stroke-width="1.2917"/>
|
||||||
|
<g transform="matrix(.70929 0 0 .70929 -99.465 -12.686)" stroke-width=".51676px" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="Strict">
|
||||||
|
<path d="m-330.78-33.775q0 0.73996-0.53676 1.154-0.53676 0.41407-1.4569 0.41407-0.99684 0-1.5336-0.25688v-0.62878q0.34506 0.14569 0.75147 0.23004 0.4064 0.08435 0.80514 0.08435 0.65177 0 0.9815-0.24538 0.32972-0.24921 0.32972-0.69012 0-0.29138-0.11885-0.47542-0.11502-0.18787-0.39107-0.34506-0.27221-0.15719-0.83198-0.35656-0.78213-0.27988-1.1195-0.66328-0.33356-0.3834-0.33356-1.0007 0-0.64794 0.48692-1.0313 0.48691-0.3834 1.2882-0.3834 0.83581 0 1.5374 0.30672l-0.2032 0.56743q-0.69395-0.29138-1.3496-0.29138-0.51759 0-0.80897 0.22237t-0.29138 0.61727q0 0.29138 0.10735 0.47925 0.10735 0.18403 0.36039 0.34123 0.25688 0.15336 0.78214 0.34122 0.88182 0.31439 1.2115 0.67478 0.33356 0.3604 0.33356 0.93549z"/>
|
||||||
|
<path d="m-328.37-32.732q0.16869 0 0.32589-0.023 0.15719-0.02684 0.24921-0.05368v0.48692q-0.10352 0.04984-0.30672 0.08051-0.19937 0.03451-0.3604 0.03451-1.2192 0-1.2192-1.2844v-2.4998h-0.60194v-0.30672l0.60194-0.26455 0.26838-0.89716h0.36807v0.97384h1.2192v0.49458h-1.2192v2.4729q0 0.37957 0.18019 0.58277 0.1802 0.2032 0.49459 0.2032z"/>
|
||||||
|
<path d="m-325.04-36.562q0.27989 0 0.50226 0.04601l-0.0882 0.59044q-0.26072-0.05751-0.46008-0.05751-0.50993 0-0.87415 0.41407-0.3604 0.41407-0.3604 1.0313v2.2544h-0.63644v-4.2021h0.52525l0.0729 0.7783h0.0307q0.23388-0.41024 0.5636-0.63261 0.32972-0.22237 0.72462-0.22237z"/>
|
||||||
|
<path d="m-323.11-32.284h-0.63644v-4.2021h0.63644zm-0.69012-5.3408q0-0.21854 0.10735-0.31822 0.10735-0.10352 0.26838-0.10352 0.15336 0 0.26455 0.10352 0.11118 0.10352 0.11118 0.31822 0 0.2147-0.11118 0.32206-0.11119 0.10352-0.26455 0.10352-0.16103 0-0.26838-0.10352-0.10735-0.10735-0.10735-0.32206z"/>
|
||||||
|
<path d="m-320.07-32.207q-0.91249 0-1.4147-0.55976-0.49842-0.5636-0.49842-1.5911 0-1.0543 0.50609-1.6294 0.50992-0.5751 1.4492-0.5751 0.30288 0 0.60577 0.06518 0.30288 0.06518 0.47541 0.15336l-0.19553 0.54059q-0.21087-0.08435-0.46008-0.13802-0.24921-0.05751-0.44091-0.05751-1.2806 0-1.2806 1.6333 0 0.77447 0.31055 1.1885 0.31439 0.41407 0.92783 0.41407 0.52526 0 1.0774-0.22621v0.5636q-0.42174 0.21854-1.062 0.21854z"/>
|
||||||
|
<path d="m-316.65-32.732q0.16869 0 0.32589-0.023 0.15719-0.02684 0.24921-0.05368v0.48692q-0.10352 0.04984-0.30672 0.08051-0.19937 0.03451-0.3604 0.03451-1.2192 0-1.2192-1.2844v-2.4998h-0.60194v-0.30672l0.60194-0.26455 0.26838-0.89716h0.36806v0.97384h1.2192v0.49458h-1.2192v2.4729q0 0.37957 0.1802 0.58277 0.1802 0.2032 0.49459 0.2032z"/>
|
||||||
|
</g>
|
||||||
|
<g fill="#fff">
|
||||||
|
<g transform="matrix(.70929 0 0 .70929 -99.465 -12.686)" stroke-width=".3317px" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="Content">
|
||||||
|
<path d="m-332.67-30.173q-0.5931 0-0.93764 0.39622-0.34208 0.39376-0.34208 1.0804 0 0.70631 0.32977 1.0927 0.33224 0.38392 0.94503 0.38392 0.37653 0 0.85889-0.13536v0.36669q-0.37407 0.14028-0.92288 0.14028-0.7949 0-1.228-0.48236-0.43067-0.48236-0.43067-1.3708 0-0.55619 0.20672-0.97456 0.20919-0.41837 0.60049-0.64478 0.39376-0.22641 0.92533-0.22641 0.56603 0 0.98933 0.20672l-0.1772 0.35931q-0.40852-0.19196-0.81705-0.19196z"/>
|
||||||
|
<path d="m-328.77-28.248q0 0.65955-0.33224 1.0312-0.33223 0.36915-0.91795 0.36915-0.36177 0-0.64233-0.16981-0.28055-0.16981-0.43313-0.48728-0.15259-0.31747-0.15259-0.74322 0-0.65955 0.32978-1.0262 0.32977-0.36915 0.91549-0.36915 0.56603 0 0.89827 0.37653 0.3347 0.37653 0.3347 1.0189zm-2.0549 0q0 0.51681 0.20672 0.78752 0.20673 0.27071 0.60787 0.27071t0.60787-0.26825q0.20918-0.27071 0.20918-0.78998 0-0.51435-0.20918-0.78014-0.20673-0.26825-0.61279-0.26825-0.40115 0-0.60541 0.26333-0.20426 0.26333-0.20426 0.78506z"/>
|
||||||
|
<path d="m-326.21-26.897v-1.7449q0-0.32978-0.15012-0.4922-0.15012-0.16243-0.47005-0.16243-0.42329 0-0.62017 0.22887-0.19688 0.22887-0.19688 0.75553v1.4151h-0.40853v-2.6973h0.33223l0.0664 0.36915h0.0197q0.12551-0.19934 0.35192-0.30762 0.22642-0.11075 0.50451-0.11075 0.48728 0 0.73338 0.23626 0.2461 0.2338 0.2461 0.75061v1.7596z"/>
|
||||||
|
<path d="m-324.09-27.185q0.10828 0 0.20918-0.01477 0.1009-0.01723 0.15997-0.03445v0.31255q-0.0665 0.03199-0.19688 0.05168-0.12797 0.02215-0.23134 0.02215-0.7826 0-0.7826-0.82444v-1.6046h-0.38637v-0.19688l0.38637-0.16981 0.17227-0.57588h0.23626v0.6251h0.7826v0.31747h-0.7826v1.5873q0 0.24364 0.11567 0.37407 0.11566 0.13043 0.31747 0.13043z"/>
|
||||||
|
<path d="m-322.04-26.848q-0.59802 0-0.94502-0.36423-0.34454-0.36423-0.34454-1.0115 0-0.65217 0.31993-1.0361 0.32239-0.38392 0.86381-0.38392 0.50697 0 0.80229 0.3347 0.29532 0.33224 0.29532 0.87858v0.25841h-1.8581q0.0123 0.47497 0.23872 0.72107 0.22887 0.2461 0.64232 0.2461 0.4356 0 0.86135-0.18212v0.36423q-0.21657 0.09352-0.41099 0.13289-0.19195 0.04184-0.46513 0.04184zm-0.11074-2.4536q-0.32485 0-0.51927 0.21165-0.19196 0.21165-0.22642 0.58572h1.4102q0-0.38638-0.17227-0.59064-0.17227-0.20672-0.4922-0.20672z"/>
|
||||||
|
<path d="m-318.51-26.897v-1.7449q0-0.32978-0.15012-0.4922-0.15013-0.16243-0.47006-0.16243-0.42329 0-0.62017 0.22887-0.19688 0.22887-0.19688 0.75553v1.4151h-0.40853v-2.6973h0.33224l0.0664 0.36915h0.0197q0.12552-0.19934 0.35193-0.30762 0.22641-0.11075 0.5045-0.11075 0.48728 0 0.73338 0.23626 0.2461 0.2338 0.2461 0.75061v1.7596z"/>
|
||||||
|
<path d="m-316.4-27.185q0.10829 0 0.20919-0.01477 0.1009-0.01723 0.15996-0.03445v0.31255q-0.0664 0.03199-0.19688 0.05168-0.12797 0.02215-0.23133 0.02215-0.7826 0-0.7826-0.82444v-1.6046h-0.38638v-0.19688l0.38638-0.16981 0.17227-0.57588h0.23625v0.6251h0.7826v0.31747h-0.7826v1.5873q0 0.24364 0.11567 0.37407 0.11567 0.13043 0.31747 0.13043z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(.70929 0 0 .70929 -99.465 -12.686)" stroke-width=".32428px" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="Security">
|
||||||
|
<path d="m-332.03-22.859q0 0.46434-0.33683 0.72417-0.33682 0.25984-0.91423 0.25984-0.62553 0-0.96236-0.1612v-0.39456q0.21653 0.09142 0.47155 0.14435 0.25503 0.05293 0.50524 0.05293 0.409 0 0.61591-0.15398 0.20691-0.15638 0.20691-0.43306 0-0.18285-0.0746-0.29833-0.0722-0.11789-0.2454-0.21653-0.17082-0.09864-0.52208-0.22375-0.4908-0.17563-0.70252-0.41622-0.20931-0.24059-0.20931-0.62794 0-0.4066 0.30555-0.64718t0.80838-0.24059q0.52448 0 0.96476 0.19247l-0.12751 0.35607q-0.43547-0.18285-0.84687-0.18285-0.3248 0-0.50765 0.13954-0.18284 0.13954-0.18284 0.38735 0 0.18285 0.0674 0.30074 0.0674 0.11548 0.22615 0.21412 0.1612 0.09624 0.4908 0.21412 0.55336 0.19728 0.76027 0.42344 0.20931 0.22615 0.20931 0.58704z"/>
|
||||||
|
<path d="m-330.26-21.875q-0.58463 0-0.92386-0.35607-0.33683-0.35607-0.33683-0.98882 0-0.63756 0.31277-1.0129 0.31517-0.37532 0.84446-0.37532 0.49562 0 0.78432 0.3272 0.28871 0.3248 0.28871 0.8589v0.25262h-1.8164q0.012 0.46434 0.23338 0.70492 0.22374 0.24059 0.62793 0.24059 0.42584 0 0.84206-0.17804v0.35607q-0.21171 0.09142-0.40178 0.12992-0.18766 0.0409-0.45471 0.0409zm-0.10827-2.3987q-0.31757 0-0.50764 0.20691-0.18766 0.20691-0.22134 0.5726h1.3786q0-0.37772-0.16841-0.57741-0.16841-0.2021-0.48118-0.2021z"/>
|
||||||
|
<path d="m-327.56-21.875q-0.5726 0-0.88777-0.35126-0.31277-0.35366-0.31277-0.99844 0-0.66162 0.31758-1.0225 0.31998-0.36088 0.90942-0.36088 0.19007 0 0.38013 0.0409 0.19007 0.0409 0.29833 0.09624l-0.1227 0.33923q-0.13232-0.05293-0.2887-0.08661-0.15639-0.03609-0.27668-0.03609-0.80357 0-0.80357 1.0249 0 0.48599 0.19488 0.74582 0.19728 0.25984 0.58223 0.25984 0.3296 0 0.67605-0.14195v0.35366q-0.26465 0.13714-0.66643 0.13714z"/>
|
||||||
|
<path d="m-325.89-24.56v1.7106q0 0.32239 0.14676 0.48118 0.14675 0.15879 0.45952 0.15879 0.41381 0 0.60388-0.22615 0.19247-0.22615 0.19247-0.73861v-1.3858h0.39938v2.6369h-0.32961l-0.0577-0.35367h-0.0217q-0.1227 0.19488-0.34163 0.29833-0.21653 0.10345-0.49561 0.10345-0.48118 0-0.72177-0.22856-0.23818-0.22856-0.23818-0.73139v-1.725z"/>
|
||||||
|
<path d="m-322.04-24.608q0.17563 0 0.31517 0.02887l-0.0553 0.37051q-0.1636-0.03609-0.2887-0.03609-0.31999 0-0.54855 0.25984-0.22615 0.25984-0.22615 0.64718v1.4147h-0.39938v-2.6369h0.32961l0.0457 0.4884h0.0192q0.14676-0.25743 0.35366-0.39697 0.20691-0.13954 0.45472-0.13954z"/>
|
||||||
|
<path d="m-320.83-21.923h-0.39938v-2.6369h0.39938zm-0.43306-3.3514q0-0.13714 0.0674-0.19969 0.0674-0.06496 0.16841-0.06496 0.0962 0 0.16601 0.06496 0.0698 0.06496 0.0698 0.19969 0 0.13473-0.0698 0.2021-0.0698 0.06496-0.16601 0.06496-0.10105 0-0.16841-0.06496-0.0674-0.06736-0.0674-0.2021z"/>
|
||||||
|
<path d="m-319.13-22.205q0.10586 0 0.2045-0.01443 0.0986-0.01684 0.15638-0.03368v0.30555q-0.065 0.03128-0.19247 0.05052-0.1251 0.02165-0.22615 0.02165-0.76507 0-0.76507-0.80597v-1.5686h-0.37773v-0.19247l0.37773-0.16601 0.16841-0.56298h0.23096v0.6111h0.76508v0.31036h-0.76508v1.5518q0 0.23818 0.11308 0.3657t0.31036 0.12751z"/>
|
||||||
|
<path d="m-318.66-24.56h0.42825l0.57742 1.5037q0.19006 0.51486 0.23577 0.74342h0.0192q0.0313-0.1227 0.12992-0.41862 0.10105-0.29833 0.6544-1.8285h0.42825l-1.1332 3.0025q-0.16841 0.44509-0.39456 0.63034-0.22375 0.18766-0.55095 0.18766-0.18285 0-0.36088-0.0409v-0.31998q0.13232 0.02887 0.29592 0.02887 0.41141 0 0.58704-0.46193l0.14676-0.37532z"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(.70929 0 0 .70929 -99.465 -12.686)" stroke-width=".32334px" style="font-feature-settings:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal" aria-label="Policy">
|
||||||
|
<path d="m-329.37-19.254q0 0.53256-0.36464 0.82043-0.36224 0.28547-1.0387 0.28547h-0.41261v1.3794h-0.40782v-3.5072h0.90919q1.3146 0 1.3146 1.0219zm-1.816 0.75566h0.36703q0.54215 0 0.78445-0.17512 0.24229-0.17512 0.24229-0.56135 0-0.34784-0.2279-0.51817t-0.71008-0.17032h-0.45579z"/>
|
||||||
|
<path d="m-326.43-18.086q0 0.64291-0.32386 1.0051-0.32385 0.35984-0.89479 0.35984-0.35264 0-0.62612-0.16552t-0.42221-0.47498q-0.14873-0.30946-0.14873-0.72447 0-0.64291 0.32145-1.0003 0.32146-0.35984 0.8924-0.35984 0.55175 0 0.8756 0.36703 0.32626 0.36704 0.32626 0.99315zm-2.0031 0q0 0.50377 0.20151 0.76765t0.59253 0.26388q0.39103 0 0.59254-0.26148 0.2039-0.26388 0.2039-0.77005 0-0.50137-0.2039-0.76046-0.20151-0.26148-0.59733-0.26148-0.39103 0-0.59014 0.25668-0.19911 0.25668-0.19911 0.76525z"/>
|
||||||
|
<path d="m-325.33-16.769h-0.39822v-3.7327h0.39822z"/>
|
||||||
|
<path d="m-324.09-16.769h-0.39822v-2.6292h0.39822zm-0.43181-3.3417q0-0.13674 0.0672-0.19911 0.0672-0.06477 0.16793-0.06477 0.0959 0 0.16552 0.06477 0.0696 0.06477 0.0696 0.19911t-0.0696 0.20151q-0.0696 0.06477-0.16552 0.06477-0.10076 0-0.16793-0.06477-0.0672-0.06717-0.0672-0.20151z"/>
|
||||||
|
<path d="m-322.19-16.721q-0.57094 0-0.8852-0.35024-0.31186-0.35264-0.31186-0.99555 0-0.6597 0.31666-1.0195 0.31906-0.35984 0.90679-0.35984 0.18951 0 0.37903 0.04078 0.18951 0.04078 0.29746 0.09596l-0.12234 0.33825q-0.13194-0.05278-0.28787-0.08636-0.15593-0.03598-0.27588-0.03598-0.80123 0-0.80123 1.0219 0 0.48458 0.19431 0.74366 0.19671 0.25908 0.58054 0.25908 0.32865 0 0.67409-0.14154v0.35264q-0.26388 0.13674-0.6645 0.13674z"/>
|
||||||
|
<path d="m-321.31-19.398h0.427l0.57574 1.4993q0.18952 0.51337 0.2351 0.74127h0.0192q0.0312-0.12234 0.12954-0.41741 0.10076-0.29747 0.65251-1.8232h0.427l-1.1299 2.9938q-0.16792 0.4438-0.39342 0.62852-0.2231 0.18712-0.54935 0.18712-0.18232 0-0.35984-0.04078v-0.31906q0.13194 0.02879 0.29507 0.02879 0.41021 0 0.58533-0.46059l0.14634-0.37423z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
190
mount-origin/test.css
Normal file
190
mount-origin/test.css
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
|
||||||
|
span.title {
|
||||||
|
font-size:18pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:normal;
|
||||||
|
text-align:center;
|
||||||
|
color:#000000;
|
||||||
|
}
|
||||||
|
span.mount {
|
||||||
|
font-size:10pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:normal;
|
||||||
|
text-align:center;
|
||||||
|
color:#000000;
|
||||||
|
}
|
||||||
|
span.mountname {
|
||||||
|
font-size:14pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:bold;
|
||||||
|
text-align:center;
|
||||||
|
color:#404010;
|
||||||
|
}
|
||||||
|
span.n {
|
||||||
|
font-size:12pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:normal;
|
||||||
|
text-align:center;
|
||||||
|
color:#808020;
|
||||||
|
}
|
||||||
|
span.v {
|
||||||
|
font-size:12pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:bold;
|
||||||
|
text-align:center;
|
||||||
|
color:#202020;
|
||||||
|
}
|
||||||
|
span.m1 {
|
||||||
|
font-size:12pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:bold;
|
||||||
|
text-align:center;
|
||||||
|
color:#202020;
|
||||||
|
}
|
||||||
|
span.m2 {
|
||||||
|
font-size:12pt;
|
||||||
|
font-family: Arial;
|
||||||
|
font-weight:normal;
|
||||||
|
text-align:center;
|
||||||
|
color:#202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
.browser { font-size:12pt; font-family: Arial; font-weight:normal; text-align:center; color:#ffff00; vertical-align:middle; text-align:center; background:#d0b070; padding:12px; -webkit-border-radius:10px; border-radius:10px;}
|
||||||
|
.group2 { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#f0f0e0;
|
||||||
|
padding:12px;
|
||||||
|
-webkit-border-radius:10px;
|
||||||
|
border-radius:10px; }
|
||||||
|
.explain { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#f0f0c0; padding:12px;
|
||||||
|
-webkit-border-radius:10px;
|
||||||
|
border-radius:10px;
|
||||||
|
color:#404000;
|
||||||
|
padding:3px;
|
||||||
|
}
|
||||||
|
td.wsstatus { vertical-align:middle; width:200px; height:50px;
|
||||||
|
text-align:center;
|
||||||
|
background:#f0f0c0; padding:6px;
|
||||||
|
-webkit-border-radius:8px;
|
||||||
|
border-radius:8px;
|
||||||
|
color:#404000; }
|
||||||
|
.tdform { vertical-align:middle; width:200px; height:50px;
|
||||||
|
text-align:center;
|
||||||
|
background:#f0f0d0; padding:6px;
|
||||||
|
-webkit-border-radius:8px;
|
||||||
|
margin:10px;
|
||||||
|
border-radius:8px;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-collapse: collapse;font-size:18pt; font-family: Arial; font-weight:normal; text-align:center; color:#000000;
|
||||||
|
color:#404000; }
|
||||||
|
|
||||||
|
td.l { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#d0d0b0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
|
||||||
|
td.bigger { font-size:120%; }
|
||||||
|
|
||||||
|
div.bgw { background:white }
|
||||||
|
div.conninfo {
|
||||||
|
border: solid 2px #e0d040;
|
||||||
|
padding: 4px;
|
||||||
|
width: 500px;
|
||||||
|
height:350px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
span.f12 { font-size:12pt }
|
||||||
|
|
||||||
|
.content { vertical-align:top; text-align:center; background:#fffff0; padding:12px; -webkit-border-radius:10px; border-radius:10px; }
|
||||||
|
.canvas { vertical-align:top; text-align:center; background:#efefd0; padding:12px; -webkit-border-radius:10px; border-radius:10px; }
|
||||||
|
.tabs {
|
||||||
|
position: relative;
|
||||||
|
min-height: 750px; /* This part sucks */
|
||||||
|
clear: both;
|
||||||
|
margin: 25px 0;
|
||||||
|
}
|
||||||
|
.tab {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.tab label {
|
||||||
|
background: #eee;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-left: -1px;
|
||||||
|
position: relative;
|
||||||
|
left: 1px;
|
||||||
|
}
|
||||||
|
.tab [type=radio] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
position: absolute;
|
||||||
|
top: 28px;
|
||||||
|
left: 0;
|
||||||
|
background: white;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
padding: 20px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
[type=radio]:checked ~ label {
|
||||||
|
background: white;
|
||||||
|
border-bottom: 1px solid white;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
[type=radio]:checked ~ label ~ .content {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.wsstatus { vertical-align:middle; width:200px; height:50px;
|
||||||
|
text-align:center;
|
||||||
|
background:#f0f0c0; padding:6px;
|
||||||
|
-webkit-border-radius:8px;
|
||||||
|
border-radius:8px;
|
||||||
|
color:#404000; }
|
||||||
|
td.l { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#d0d0b0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
td.dl { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#c0c0c0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
td.c { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#c0c0a0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
td.c0 { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#b0b090;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
td.dc0 { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#a0a0a0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
td.c1 { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#c0c0c0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
|
td.t { vertical-align:middle;
|
||||||
|
text-align:center;
|
||||||
|
background:#e0e0c0;
|
||||||
|
padding:3px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
border-radius:3px; }
|
||||||
261
mount-origin/test.html
Normal file
261
mount-origin/test.html
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset=utf-8 http-equiv="Content-Language" content="en"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="test.css"/>
|
||||||
|
<script type='text/javascript' src="/lws-common.js"></script>
|
||||||
|
<script type='text/javascript' src='test.js'></script>
|
||||||
|
<title>Minimal Websocket test app</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header></header>
|
||||||
|
<article>
|
||||||
|
|
||||||
|
<table><tr><td>
|
||||||
|
|
||||||
|
<table width=800px>
|
||||||
|
<tr>
|
||||||
|
<td valign=middle align=center>
|
||||||
|
<a href="https://libwebsockets.org">
|
||||||
|
<img src="libwebsockets.org-logo.svg"></a>
|
||||||
|
</td>
|
||||||
|
<td><img src="strict-csp.svg"></td>
|
||||||
|
<td>
|
||||||
|
<section class="browser">
|
||||||
|
<div id=brow>...</div></section>
|
||||||
|
</td>
|
||||||
|
<td width="64" height="64" id="wstransport"></td>
|
||||||
|
<td width="64" height="64" id="transport"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td></tr>
|
||||||
|
<tr><td colspan=2 align=center>
|
||||||
|
Click <a href="leaf.jpg" target="_blank">Here</a> to
|
||||||
|
have the test server send a big picture by http.
|
||||||
|
</td></tr>
|
||||||
|
<tr><td colspan=2>
|
||||||
|
<div class="tabs">
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<input type="radio" id="tab-1" name="tab-group-1" checked>
|
||||||
|
<label for="tab-1">Dumb Increment Demo</label>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div id="dumb" class="group2">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td id=wsdi_statustd align=center class="wsstatus">
|
||||||
|
<span id=wsdi_status>Websocket connection not initialized
|
||||||
|
</span></td>
|
||||||
|
<td><span class="title">dumb increment-protocol</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="explain" colspan=2>
|
||||||
|
The incrementing number is coming from the server at 20Hz and is individual for
|
||||||
|
each connection to the server... try opening a second browser window.
|
||||||
|
<br/><br/>
|
||||||
|
The button sends a message over the websocket link to ask the server
|
||||||
|
to zero just this connection's number.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center><div id=number class="bigger"> </div></td>
|
||||||
|
<td align=center>
|
||||||
|
<input type=button id=offset value="Reset counter">
|
||||||
|
<input type=button id=junk value="Send junk">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<input type="radio" id="tab-2" name="tab-group-1">
|
||||||
|
<label for="tab-2">Mirror Demo</label>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div id="mirror" class="group2">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan=1 id=wslm_statustd align=center class="wsstatus">
|
||||||
|
<span id=wslm_status>Websocket connection not initialized</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span class="title">lws-mirror-protocol</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan=2>
|
||||||
|
<div class="explain">
|
||||||
|
Use the mouse to draw on the canvas below -- all other browser windows open
|
||||||
|
on this page see your drawing in realtime and you can see any of theirs as
|
||||||
|
well.
|
||||||
|
<br/><br/>
|
||||||
|
The lws-mirror protocol doesn't interpret what is being sent to it, it just
|
||||||
|
re-sends it to every other websocket it has a connection with using that
|
||||||
|
protocol, including the guy who sent the packet.
|
||||||
|
<br/><br/>
|
||||||
|
<b>libwebsockets-test-client</b> joins in by spamming circles on to this
|
||||||
|
shared canvas when run.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan=2>Drawing color:
|
||||||
|
<select id="color">
|
||||||
|
<option value=#000000>Black</option>
|
||||||
|
<option value=#0000ff>Blue</option>
|
||||||
|
<option value=#20ff20>Green</option>
|
||||||
|
<option value=#802020>Dark Red</option>
|
||||||
|
</select>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 width=500 height=320>
|
||||||
|
<div id="wslm_drawing" class="bgw"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<input type="radio" id="tab-3" name="tab-group-1">
|
||||||
|
<label for="tab-3">Close Testing</label>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div id="ot" class="group2">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td></tr>
|
||||||
|
<tr><td id=ot_statustd align=center class="wsstatus">
|
||||||
|
<span id=ot_status>Websocket connection not initialized</span>
|
||||||
|
</td>
|
||||||
|
<td colspan=2><span class="title">Open and close testing
|
||||||
|
</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="explain" colspan=3 >
|
||||||
|
To help with open and close testing, you can open and close a connection by
|
||||||
|
hand using the buttons.<br>
|
||||||
|
"<b>Close</b>" closes the connection from the browser with code 3000
|
||||||
|
and reason 'Bye!".<br>
|
||||||
|
"<b>Request Server Close</b>" sends a message asking the server to
|
||||||
|
initiate the close, which it does with code 1001 and reason "Seeya".
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center>
|
||||||
|
<input type="button" id="ot_open_btn" value="Open"></td>
|
||||||
|
<td align=center>
|
||||||
|
<input type="button" id="ot_close_btn" disabled value="Close" ></td>
|
||||||
|
<td align=center>
|
||||||
|
<input type="button" id="ot_req_close_btn" disabled
|
||||||
|
value="Request Server Close" ></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<input type="radio" id="tab-4" name="tab-group-1">
|
||||||
|
<label for="tab-4">Server info</label>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div id="ot" class="group2">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td id=s_statustd align=center class="wsstatus">
|
||||||
|
<div id=s_status>Websocket connection not initialized</div>
|
||||||
|
</td>
|
||||||
|
<td colspan=1>
|
||||||
|
<span class="title">Server Info</span>
|
||||||
|
<input type=button id=pmd value="Test pmd">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class="explain" colspan=2>
|
||||||
|
This information is sent by the server over a ws[s] link and updated live
|
||||||
|
whenever the information changes server-side.
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center colspan=2><div id=servinfo></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center colspan=2><div id=conninfo class="conninfo"></div></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
<input type="radio" id="tab-5" name="tab-group-1">
|
||||||
|
<label for="tab-5">POST</label>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div id="ot" class="group2">
|
||||||
|
<table width=100%>
|
||||||
|
<tr>
|
||||||
|
<td colspan=1>
|
||||||
|
<span class="title">POST Form testing</span>
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td class="explain" colspan=2>
|
||||||
|
This tests POST handling in lws.
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center colspan=2 class=tdform><div id=postinfo>
|
||||||
|
FORM 1: send with urlencoded POST body args<br>
|
||||||
|
<form action="formtest" method="post">
|
||||||
|
<span class="f12">Some text: </span>
|
||||||
|
<input type="text" name="text" value="Give me some text"><br>
|
||||||
|
<input type="submit" name="send" value="Send the form">
|
||||||
|
</form>
|
||||||
|
</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td align=center colspan=2 class=tdform><div id=postinfo >
|
||||||
|
FORM 2: send with multipart/form-data<br>
|
||||||
|
(can handle file upload, test limited to 100KB)<br>
|
||||||
|
<form name=multipart action="formtest" method="post"
|
||||||
|
enctype="multipart/form-data">
|
||||||
|
<span class="f12">Some text: </span>
|
||||||
|
<input type="text" name="text" value="Give me some text">
|
||||||
|
<br>
|
||||||
|
<input type="file" name="file" id="file" size="20">
|
||||||
|
<span id=file_info class="f12"></span><br>
|
||||||
|
<input type="submit" id="upload" name="upload" disabled=1 value="Upload">
|
||||||
|
</form>
|
||||||
|
</div></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
Looking for support?
|
||||||
|
<a href="https://libwebsockets.org">https://libwebsockets.org</a>,
|
||||||
|
<a href="https://github.com/warmcat/libwebsockets">
|
||||||
|
https://github.com/warmcat/libwebsockets</a></a><br/>
|
||||||
|
Join the mailing list:
|
||||||
|
<a href="https://libwebsockets.org/mailman/listinfo/libwebsockets">
|
||||||
|
https://libwebsockets.org/mailman/listinfo/libwebsockets</a>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
543
mount-origin/test.js
Normal file
543
mount-origin/test.js
Normal file
File diff suppressed because one or more lines are too long
BIN
mount-origin/wss-over-h2.png
Normal file
BIN
mount-origin/wss-over-h2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -6,6 +6,8 @@ set (CMAKE_MODULE_PATH "${MODULE_PATH}")
|
|||||||
set (CMAKE_CXX_STANDARD 11)
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/../nats.c/src)
|
include_directories(${CMAKE_SOURCE_DIR}/../nats.c/src)
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/../libuv/include)
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/build/libwebsockets/include)
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||||
|
|
||||||
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing")
|
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing")
|
||||||
@@ -13,12 +15,7 @@ include_directories(${CMAKE_SOURCE_DIR}/src)
|
|||||||
file(
|
file(
|
||||||
GLOB_RECURSE
|
GLOB_RECURSE
|
||||||
source_files
|
source_files
|
||||||
main.cpp
|
main.c
|
||||||
server/domo-server.cpp
|
|
||||||
broker/nats-broker.cpp
|
|
||||||
web/web-server.cpp
|
|
||||||
tinyweb/tinyweb.c
|
|
||||||
tinyweb/tools.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable (domo-iot ${source_files})
|
add_executable (domo-iot ${source_files})
|
||||||
@@ -26,8 +23,8 @@ add_executable (domo-iot ${source_files})
|
|||||||
target_link_libraries (domo-iot
|
target_link_libraries (domo-iot
|
||||||
LINK_PUBLIC
|
LINK_PUBLIC
|
||||||
nats_static
|
nats_static
|
||||||
json-c
|
websockets
|
||||||
uv
|
uv_a
|
||||||
rt
|
rt
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
148
src/plugins/protocol_dumb_increment.c
Normal file
148
src/plugins/protocol_dumb_increment.c
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/*
|
||||||
|
* ws protocol handler plugin for "dumb increment"
|
||||||
|
*
|
||||||
|
* Written in 2010-2019 by Andy Green <andy@warmcat.com>
|
||||||
|
*
|
||||||
|
* This file is made available under the Creative Commons CC0 1.0
|
||||||
|
* Universal Public Domain Dedication.
|
||||||
|
*
|
||||||
|
* The person who associated a work with this deed has dedicated
|
||||||
|
* the work to the public domain by waiving all of his or her rights
|
||||||
|
* to the work worldwide under copyright law, including all related
|
||||||
|
* and neighboring rights, to the extent allowed by law. You can copy,
|
||||||
|
* modify, distribute and perform the work, even for commercial purposes,
|
||||||
|
* all without asking permission.
|
||||||
|
*
|
||||||
|
* These test plugins are intended to be adapted for use in your code, which
|
||||||
|
* may be proprietary. So unlike the library itself, they are licensed
|
||||||
|
* Public Domain.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
#define LWS_DLL
|
||||||
|
#define LWS_INTERNAL
|
||||||
|
#include <libwebsockets.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define DUMB_PERIOD_US 50000
|
||||||
|
|
||||||
|
struct pss__dumb_increment {
|
||||||
|
int number;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct vhd__dumb_increment {
|
||||||
|
const unsigned int *options;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int
|
||||||
|
callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
|
||||||
|
void *user, void *in, size_t len)
|
||||||
|
{
|
||||||
|
struct pss__dumb_increment *pss = (struct pss__dumb_increment *)user;
|
||||||
|
struct vhd__dumb_increment *vhd =
|
||||||
|
(struct vhd__dumb_increment *)
|
||||||
|
lws_protocol_vh_priv_get(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi));
|
||||||
|
uint8_t buf[LWS_PRE + 20], *p = &buf[LWS_PRE];
|
||||||
|
const struct lws_protocol_vhost_options *opt;
|
||||||
|
int n, m;
|
||||||
|
|
||||||
|
switch (reason) {
|
||||||
|
case LWS_CALLBACK_PROTOCOL_INIT:
|
||||||
|
vhd = lws_protocol_vh_priv_zalloc(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi),
|
||||||
|
sizeof(struct vhd__dumb_increment));
|
||||||
|
if (!vhd)
|
||||||
|
return -1;
|
||||||
|
if ((opt = lws_pvo_search(
|
||||||
|
(const struct lws_protocol_vhost_options *)in,
|
||||||
|
"options")))
|
||||||
|
vhd->options = (unsigned int *)opt->value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_ESTABLISHED:
|
||||||
|
pss->number = 0;
|
||||||
|
if (!vhd->options || !((*vhd->options) & 1))
|
||||||
|
lws_set_timer_usecs(wsi, DUMB_PERIOD_US);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_SERVER_WRITEABLE:
|
||||||
|
n = lws_snprintf((char *)p, sizeof(buf) - LWS_PRE, "%d",
|
||||||
|
pss->number++);
|
||||||
|
m = lws_write(wsi, p, n, LWS_WRITE_TEXT);
|
||||||
|
if (m < n) {
|
||||||
|
lwsl_err("ERROR %d writing to di socket\n", n);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_RECEIVE:
|
||||||
|
if (len < 6)
|
||||||
|
break;
|
||||||
|
if (strncmp((const char *)in, "reset\n", 6) == 0)
|
||||||
|
pss->number = 0;
|
||||||
|
if (strncmp((const char *)in, "closeme\n", 8) == 0) {
|
||||||
|
lwsl_notice("dumb_inc: closing as requested\n");
|
||||||
|
lws_close_reason(wsi, LWS_CLOSE_STATUS_GOINGAWAY,
|
||||||
|
(unsigned char *)"seeya", 5);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_TIMER:
|
||||||
|
if (!vhd->options || !((*vhd->options) & 1)) {
|
||||||
|
lws_callback_on_writable_all_protocol_vhost(
|
||||||
|
lws_get_vhost(wsi), lws_get_protocol(wsi));
|
||||||
|
lws_set_timer_usecs(wsi, DUMB_PERIOD_US);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LWS_PLUGIN_PROTOCOL_DUMB_INCREMENT \
|
||||||
|
{ \
|
||||||
|
"dumb-increment-protocol", \
|
||||||
|
callback_dumb_increment, \
|
||||||
|
sizeof(struct pss__dumb_increment), \
|
||||||
|
10, /* rx buf size must be >= permessage-deflate rx size */ \
|
||||||
|
0, NULL, 0 \
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
|
||||||
|
static const struct lws_protocols protocols[] = {
|
||||||
|
LWS_PLUGIN_PROTOCOL_DUMB_INCREMENT
|
||||||
|
};
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
init_protocol_dumb_increment(struct lws_context *context,
|
||||||
|
struct lws_plugin_capability *c)
|
||||||
|
{
|
||||||
|
if (c->api_magic != LWS_PLUGIN_API_MAGIC) {
|
||||||
|
lwsl_err("Plugin API %d, library API %d", LWS_PLUGIN_API_MAGIC,
|
||||||
|
c->api_magic);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
c->protocols = protocols;
|
||||||
|
c->count_protocols = LWS_ARRAY_SIZE(protocols);
|
||||||
|
c->extensions = NULL;
|
||||||
|
c->count_extensions = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
destroy_protocol_dumb_increment(struct lws_context *context)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
497
src/plugins/protocol_lws_mirror.c
Normal file
497
src/plugins/protocol_lws_mirror.c
Normal file
@@ -0,0 +1,497 @@
|
|||||||
|
/*
|
||||||
|
* libwebsockets-test-server - libwebsockets test implementation
|
||||||
|
*
|
||||||
|
* Written in 2010-2019 by Andy Green <andy@warmcat.com>
|
||||||
|
*
|
||||||
|
* This file is made available under the Creative Commons CC0 1.0
|
||||||
|
* Universal Public Domain Dedication.
|
||||||
|
*
|
||||||
|
* The person who associated a work with this deed has dedicated
|
||||||
|
* the work to the public domain by waiving all of his or her rights
|
||||||
|
* to the work worldwide under copyright law, including all related
|
||||||
|
* and neighboring rights, to the extent allowed by law. You can copy,
|
||||||
|
* modify, distribute and perform the work, even for commercial purposes,
|
||||||
|
* all without asking permission.
|
||||||
|
*
|
||||||
|
* The test apps are intended to be adapted for use in your code, which
|
||||||
|
* may be proprietary. So unlike the library itself, they are licensed
|
||||||
|
* Public Domain.
|
||||||
|
*
|
||||||
|
* Notice that the lws_pthread... locking apis are all zero-footprint
|
||||||
|
* NOPs in the case LWS_MAX_SMP == 1, which is the default. When lws
|
||||||
|
* is built for multiple service threads though, they resolve to their
|
||||||
|
* pthreads equivalents.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
#define LWS_DLL
|
||||||
|
#define LWS_INTERNAL
|
||||||
|
#include <libwebsockets.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define QUEUELEN 32
|
||||||
|
/* queue free space below this, rx flow is disabled */
|
||||||
|
#define RXFLOW_MIN (4)
|
||||||
|
/* queue free space above this, rx flow is enabled */
|
||||||
|
#define RXFLOW_MAX ((2 * QUEUELEN) / 3)
|
||||||
|
|
||||||
|
#define MAX_MIRROR_INSTANCES 3
|
||||||
|
|
||||||
|
struct mirror_instance;
|
||||||
|
|
||||||
|
struct per_session_data__lws_mirror {
|
||||||
|
struct lws *wsi;
|
||||||
|
struct mirror_instance *mi;
|
||||||
|
struct per_session_data__lws_mirror *same_mi_pss_list;
|
||||||
|
uint32_t tail;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* this is the element in the ring */
|
||||||
|
struct a_message {
|
||||||
|
void *payload;
|
||||||
|
size_t len;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mirror_instance {
|
||||||
|
struct mirror_instance *next;
|
||||||
|
lws_pthread_mutex(lock) /* protects all mirror instance data */
|
||||||
|
struct per_session_data__lws_mirror *same_mi_pss_list;
|
||||||
|
/**< must hold the the per_vhost_data__lws_mirror.lock as well
|
||||||
|
* to change mi list membership */
|
||||||
|
struct lws_ring *ring;
|
||||||
|
int messages_allocated;
|
||||||
|
char name[30];
|
||||||
|
char rx_enabled;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct per_vhost_data__lws_mirror {
|
||||||
|
lws_pthread_mutex(lock) /* protects mi_list membership changes */
|
||||||
|
struct mirror_instance *mi_list;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* enable or disable rx from all connections to this mirror instance */
|
||||||
|
static void
|
||||||
|
__mirror_rxflow_instance(struct mirror_instance *mi, int enable)
|
||||||
|
{
|
||||||
|
lws_start_foreach_ll(struct per_session_data__lws_mirror *,
|
||||||
|
pss, mi->same_mi_pss_list) {
|
||||||
|
lws_rx_flow_control(pss->wsi, enable);
|
||||||
|
} lws_end_foreach_ll(pss, same_mi_pss_list);
|
||||||
|
|
||||||
|
mi->rx_enabled = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find out which connection to this mirror instance has the longest number
|
||||||
|
* of still unread elements in the ringbuffer and update the lws_ring "oldest
|
||||||
|
* tail" with it. Elements behind the "oldest tail" are freed and recycled for
|
||||||
|
* new head content. Elements after the "oldest tail" are still waiting to be
|
||||||
|
* read by somebody.
|
||||||
|
*
|
||||||
|
* If the oldest tail moved on from before, check if it created enough space
|
||||||
|
* in the queue to re-enable RX flow control for the mirror instance.
|
||||||
|
*
|
||||||
|
* Mark connections that are at the oldest tail as being on a 3s timeout to
|
||||||
|
* transmit something, otherwise the connection will be closed. Without this,
|
||||||
|
* a choked or nonresponsive connection can block the FIFO from freeing up any
|
||||||
|
* new space for new data.
|
||||||
|
*
|
||||||
|
* You can skip calling this if on your connection, before processing, the tail
|
||||||
|
* was not equal to the current worst, ie, if the tail you will work on is !=
|
||||||
|
* lws_ring_get_oldest_tail(ring) then no need to call this when the tail
|
||||||
|
* has changed; it wasn't the oldest so it won't change the oldest.
|
||||||
|
*
|
||||||
|
* Returns 0 if oldest unchanged or 1 if oldest changed from this call.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
__mirror_update_worst_tail(struct mirror_instance *mi)
|
||||||
|
{
|
||||||
|
uint32_t wai, worst = 0, worst_tail = 0, oldest;
|
||||||
|
struct per_session_data__lws_mirror *worst_pss = NULL;
|
||||||
|
|
||||||
|
oldest = lws_ring_get_oldest_tail(mi->ring);
|
||||||
|
|
||||||
|
lws_start_foreach_ll(struct per_session_data__lws_mirror *,
|
||||||
|
pss, mi->same_mi_pss_list) {
|
||||||
|
wai = (uint32_t)lws_ring_get_count_waiting_elements(mi->ring,
|
||||||
|
&pss->tail);
|
||||||
|
if (wai >= worst) {
|
||||||
|
worst = wai;
|
||||||
|
worst_tail = pss->tail;
|
||||||
|
worst_pss = pss;
|
||||||
|
}
|
||||||
|
} lws_end_foreach_ll(pss, same_mi_pss_list);
|
||||||
|
|
||||||
|
if (!worst_pss)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
lws_ring_update_oldest_tail(mi->ring, worst_tail);
|
||||||
|
if (oldest == lws_ring_get_oldest_tail(mi->ring))
|
||||||
|
return 0;
|
||||||
|
/*
|
||||||
|
* The oldest tail did move on. Check if we should re-enable rx flow
|
||||||
|
* for the mirror instance since we made some space now.
|
||||||
|
*/
|
||||||
|
if (!mi->rx_enabled && /* rx is disabled */
|
||||||
|
lws_ring_get_count_free_elements(mi->ring) >= RXFLOW_MAX)
|
||||||
|
/* there is enough space, let's re-enable rx for our instance */
|
||||||
|
__mirror_rxflow_instance(mi, 1);
|
||||||
|
|
||||||
|
/* if nothing in queue, no timeout needed */
|
||||||
|
if (!worst)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The guy(s) with the oldest tail block the ringbuffer from recycling
|
||||||
|
* the FIFO entries he has not read yet. Don't allow those guys to
|
||||||
|
* block the FIFO operation for very long.
|
||||||
|
*/
|
||||||
|
lws_start_foreach_ll(struct per_session_data__lws_mirror *,
|
||||||
|
pss, mi->same_mi_pss_list) {
|
||||||
|
if (pss->tail == worst_tail)
|
||||||
|
/*
|
||||||
|
* Our policy is if you are the slowest connection,
|
||||||
|
* you had better transmit something to help with that
|
||||||
|
* within 3s, or we will hang up on you to stop you
|
||||||
|
* blocking the FIFO for everyone else.
|
||||||
|
*/
|
||||||
|
lws_set_timeout(pss->wsi,
|
||||||
|
PENDING_TIMEOUT_USER_REASON_BASE, 3);
|
||||||
|
} lws_end_foreach_ll(pss, same_mi_pss_list);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
__mirror_callback_all_in_mi_on_writable(struct mirror_instance *mi)
|
||||||
|
{
|
||||||
|
/* ask for WRITABLE callback for every wsi on this mi */
|
||||||
|
lws_start_foreach_ll(struct per_session_data__lws_mirror *,
|
||||||
|
pss, mi->same_mi_pss_list) {
|
||||||
|
lws_callback_on_writable(pss->wsi);
|
||||||
|
} lws_end_foreach_ll(pss, same_mi_pss_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
__mirror_destroy_message(void *_msg)
|
||||||
|
{
|
||||||
|
struct a_message *msg = _msg;
|
||||||
|
|
||||||
|
free(msg->payload);
|
||||||
|
msg->payload = NULL;
|
||||||
|
msg->len = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
|
||||||
|
void *user, void *in, size_t len)
|
||||||
|
{
|
||||||
|
struct per_session_data__lws_mirror *pss =
|
||||||
|
(struct per_session_data__lws_mirror *)user;
|
||||||
|
struct per_vhost_data__lws_mirror *v =
|
||||||
|
(struct per_vhost_data__lws_mirror *)
|
||||||
|
lws_protocol_vh_priv_get(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi));
|
||||||
|
char name[300], update_worst, sent_something, *pn = name;
|
||||||
|
struct mirror_instance *mi = NULL;
|
||||||
|
const struct a_message *msg;
|
||||||
|
struct a_message amsg;
|
||||||
|
uint32_t oldest_tail;
|
||||||
|
int n, count_mi = 0;
|
||||||
|
|
||||||
|
switch (reason) {
|
||||||
|
case LWS_CALLBACK_ESTABLISHED:
|
||||||
|
lwsl_info("%s: LWS_CALLBACK_ESTABLISHED\n", __func__);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* mirror instance name... defaults to "", but if URL includes
|
||||||
|
* "?mirror=xxx", will be "xxx"
|
||||||
|
*/
|
||||||
|
name[0] = '\0';
|
||||||
|
if (!lws_get_urlarg_by_name(wsi, "mirror", name,
|
||||||
|
sizeof(name) - 1))
|
||||||
|
lwsl_debug("get urlarg failed\n");
|
||||||
|
if (strchr(name, '='))
|
||||||
|
pn = strchr(name, '=') + 1;
|
||||||
|
|
||||||
|
//lwsl_notice("%s: mirror name '%s'\n", __func__, pn);
|
||||||
|
|
||||||
|
/* is there already a mirror instance of this name? */
|
||||||
|
|
||||||
|
lws_pthread_mutex_lock(&v->lock); /* vhost lock { */
|
||||||
|
|
||||||
|
lws_start_foreach_ll(struct mirror_instance *, mi1,
|
||||||
|
v->mi_list) {
|
||||||
|
count_mi++;
|
||||||
|
if (!strcmp(pn, mi1->name)) {
|
||||||
|
/* yes... we will join it */
|
||||||
|
mi = mi1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} lws_end_foreach_ll(mi1, next);
|
||||||
|
|
||||||
|
if (!mi) {
|
||||||
|
|
||||||
|
/* no existing mirror instance for name */
|
||||||
|
if (count_mi == MAX_MIRROR_INSTANCES) {
|
||||||
|
lws_pthread_mutex_unlock(&v->lock); /* } vh lock */
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* create one with this name, and join it */
|
||||||
|
mi = malloc(sizeof(*mi));
|
||||||
|
if (!mi)
|
||||||
|
goto bail1;
|
||||||
|
memset(mi, 0, sizeof(*mi));
|
||||||
|
mi->ring = lws_ring_create(sizeof(struct a_message),
|
||||||
|
QUEUELEN,
|
||||||
|
__mirror_destroy_message);
|
||||||
|
if (!mi->ring) {
|
||||||
|
free(mi);
|
||||||
|
goto bail1;
|
||||||
|
}
|
||||||
|
|
||||||
|
mi->next = v->mi_list;
|
||||||
|
v->mi_list = mi;
|
||||||
|
lws_snprintf(mi->name, sizeof(mi->name) - 1, "%s", pn);
|
||||||
|
mi->rx_enabled = 1;
|
||||||
|
|
||||||
|
lws_pthread_mutex_init(&mi->lock);
|
||||||
|
|
||||||
|
lwsl_notice("Created new mi %p '%s'\n", mi, pn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add our pss to list of guys bound to this mi */
|
||||||
|
|
||||||
|
lws_ll_fwd_insert(pss, same_mi_pss_list, mi->same_mi_pss_list);
|
||||||
|
|
||||||
|
/* init the pss */
|
||||||
|
|
||||||
|
pss->mi = mi;
|
||||||
|
pss->tail = lws_ring_get_oldest_tail(mi->ring);
|
||||||
|
pss->wsi = wsi;
|
||||||
|
|
||||||
|
lws_pthread_mutex_unlock(&v->lock); /* } vhost lock */
|
||||||
|
break;
|
||||||
|
|
||||||
|
bail1:
|
||||||
|
lws_pthread_mutex_unlock(&v->lock); /* } vhost lock */
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_CLOSED:
|
||||||
|
/* detach our pss from the mirror instance */
|
||||||
|
mi = pss->mi;
|
||||||
|
if (!mi)
|
||||||
|
break;
|
||||||
|
|
||||||
|
lws_pthread_mutex_lock(&v->lock); /* vhost lock { */
|
||||||
|
|
||||||
|
/* remove our closing pss from its mirror instance list */
|
||||||
|
lws_ll_fwd_remove(struct per_session_data__lws_mirror,
|
||||||
|
same_mi_pss_list, pss, mi->same_mi_pss_list);
|
||||||
|
pss->mi = NULL;
|
||||||
|
|
||||||
|
if (mi->same_mi_pss_list) {
|
||||||
|
/*
|
||||||
|
* Still other pss using the mirror instance. The pss
|
||||||
|
* going away may have had the oldest tail, reconfirm
|
||||||
|
* using the remaining pss what is the current oldest
|
||||||
|
* tail. If the oldest tail moves on, this call also
|
||||||
|
* will re-enable rx flow control when appropriate.
|
||||||
|
*/
|
||||||
|
lws_pthread_mutex_lock(&mi->lock); /* mi lock { */
|
||||||
|
__mirror_update_worst_tail(mi);
|
||||||
|
lws_pthread_mutex_unlock(&mi->lock); /* } mi lock */
|
||||||
|
lws_pthread_mutex_unlock(&v->lock); /* } vhost lock */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* No more pss using the mirror instance... delete mi */
|
||||||
|
|
||||||
|
lws_start_foreach_llp(struct mirror_instance **,
|
||||||
|
pmi, v->mi_list) {
|
||||||
|
if (*pmi == mi) {
|
||||||
|
*pmi = (*pmi)->next;
|
||||||
|
|
||||||
|
lws_ring_destroy(mi->ring);
|
||||||
|
lws_pthread_mutex_destroy(&mi->lock);
|
||||||
|
|
||||||
|
free(mi);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} lws_end_foreach_llp(pmi, next);
|
||||||
|
|
||||||
|
lws_pthread_mutex_unlock(&v->lock); /* } vhost lock */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_CONFIRM_EXTENSION_OKAY:
|
||||||
|
return 1; /* disallow compression */
|
||||||
|
|
||||||
|
case LWS_CALLBACK_PROTOCOL_INIT: /* per vhost */
|
||||||
|
lws_protocol_vh_priv_zalloc(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi),
|
||||||
|
sizeof(struct per_vhost_data__lws_mirror));
|
||||||
|
v = (struct per_vhost_data__lws_mirror *)
|
||||||
|
lws_protocol_vh_priv_get(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi));
|
||||||
|
lws_pthread_mutex_init(&v->lock);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_PROTOCOL_DESTROY:
|
||||||
|
lws_pthread_mutex_destroy(&v->lock);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_SERVER_WRITEABLE:
|
||||||
|
lws_pthread_mutex_lock(&pss->mi->lock); /* instance lock { */
|
||||||
|
oldest_tail = lws_ring_get_oldest_tail(pss->mi->ring);
|
||||||
|
update_worst = oldest_tail == pss->tail;
|
||||||
|
sent_something = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
msg = lws_ring_get_element(pss->mi->ring, &pss->tail);
|
||||||
|
if (!msg)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (!msg->payload) {
|
||||||
|
lwsl_err("%s: NULL payload: worst = %d,"
|
||||||
|
" pss->tail = %d\n", __func__,
|
||||||
|
oldest_tail, pss->tail);
|
||||||
|
if (lws_ring_consume(pss->mi->ring, &pss->tail,
|
||||||
|
NULL, 1))
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
n = lws_write(wsi, (unsigned char *)msg->payload +
|
||||||
|
LWS_PRE, msg->len, LWS_WRITE_TEXT);
|
||||||
|
if (n < 0) {
|
||||||
|
lwsl_info("%s: WRITEABLE: %d\n", __func__, n);
|
||||||
|
|
||||||
|
goto bail2;
|
||||||
|
}
|
||||||
|
sent_something = 1;
|
||||||
|
lws_ring_consume(pss->mi->ring, &pss->tail, NULL, 1);
|
||||||
|
|
||||||
|
} while (!lws_send_pipe_choked(wsi));
|
||||||
|
|
||||||
|
/* if any left for us to send, ask for writeable again */
|
||||||
|
if (lws_ring_get_count_waiting_elements(pss->mi->ring,
|
||||||
|
&pss->tail))
|
||||||
|
lws_callback_on_writable(wsi);
|
||||||
|
|
||||||
|
if (!sent_something || !update_worst)
|
||||||
|
goto done1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We are no longer holding the oldest tail (since we sent
|
||||||
|
* something. So free us of the timeout related to hogging the
|
||||||
|
* oldest tail.
|
||||||
|
*/
|
||||||
|
lws_set_timeout(pss->wsi, NO_PENDING_TIMEOUT, 0);
|
||||||
|
/*
|
||||||
|
* If we were originally at the oldest fifo position of
|
||||||
|
* all the tails, now we used some up we may have
|
||||||
|
* changed the oldest fifo position and made some space.
|
||||||
|
*/
|
||||||
|
__mirror_update_worst_tail(pss->mi);
|
||||||
|
|
||||||
|
done1:
|
||||||
|
lws_pthread_mutex_unlock(&pss->mi->lock); /* } instance lock */
|
||||||
|
break;
|
||||||
|
|
||||||
|
bail2:
|
||||||
|
lws_pthread_mutex_unlock(&pss->mi->lock); /* } instance lock */
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_RECEIVE:
|
||||||
|
lws_pthread_mutex_lock(&pss->mi->lock); /* mi lock { */
|
||||||
|
n = (int)lws_ring_get_count_free_elements(pss->mi->ring);
|
||||||
|
if (!n) {
|
||||||
|
lwsl_notice("dropping!\n");
|
||||||
|
if (pss->mi->rx_enabled)
|
||||||
|
__mirror_rxflow_instance(pss->mi, 0);
|
||||||
|
goto req_writable;
|
||||||
|
}
|
||||||
|
|
||||||
|
amsg.payload = malloc(LWS_PRE + len);
|
||||||
|
amsg.len = len;
|
||||||
|
if (!amsg.payload) {
|
||||||
|
lwsl_notice("OOM: dropping\n");
|
||||||
|
goto done2;
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy((char *)amsg.payload + LWS_PRE, in, len);
|
||||||
|
if (!lws_ring_insert(pss->mi->ring, &amsg, 1)) {
|
||||||
|
__mirror_destroy_message(&amsg);
|
||||||
|
lwsl_notice("dropping!\n");
|
||||||
|
if (pss->mi->rx_enabled)
|
||||||
|
__mirror_rxflow_instance(pss->mi, 0);
|
||||||
|
goto req_writable;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pss->mi->rx_enabled &&
|
||||||
|
lws_ring_get_count_free_elements(pss->mi->ring) <
|
||||||
|
RXFLOW_MIN)
|
||||||
|
__mirror_rxflow_instance(pss->mi, 0);
|
||||||
|
|
||||||
|
req_writable:
|
||||||
|
__mirror_callback_all_in_mi_on_writable(pss->mi);
|
||||||
|
|
||||||
|
done2:
|
||||||
|
lws_pthread_mutex_unlock(&pss->mi->lock); /* } mi lock */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_EVENT_WAIT_CANCELLED:
|
||||||
|
lwsl_info("LWS_CALLBACK_EVENT_WAIT_CANCELLED\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LWS_PLUGIN_PROTOCOL_MIRROR { \
|
||||||
|
"lws-mirror-protocol", \
|
||||||
|
callback_lws_mirror, \
|
||||||
|
sizeof(struct per_session_data__lws_mirror), \
|
||||||
|
4096, /* rx buf size must be >= permessage-deflate rx size */ \
|
||||||
|
0, NULL, 0 \
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
|
||||||
|
static const struct lws_protocols protocols[] = {
|
||||||
|
LWS_PLUGIN_PROTOCOL_MIRROR
|
||||||
|
};
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
init_protocol_lws_mirror(struct lws_context *context,
|
||||||
|
struct lws_plugin_capability *c)
|
||||||
|
{
|
||||||
|
if (c->api_magic != LWS_PLUGIN_API_MAGIC) {
|
||||||
|
lwsl_err("Plugin API %d, library API %d", LWS_PLUGIN_API_MAGIC,
|
||||||
|
c->api_magic);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
c->protocols = protocols;
|
||||||
|
c->count_protocols = LWS_ARRAY_SIZE(protocols);
|
||||||
|
c->extensions = NULL;
|
||||||
|
c->count_extensions = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
destroy_protocol_lws_mirror(struct lws_context *context)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
271
src/plugins/protocol_lws_status.c
Normal file
271
src/plugins/protocol_lws_status.c
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
/*
|
||||||
|
* libwebsockets-test-server - libwebsockets test implementation
|
||||||
|
*
|
||||||
|
* Written in 2010-2019 by Andy Green <andy@warmcat.com>
|
||||||
|
*
|
||||||
|
* This file is made available under the Creative Commons CC0 1.0
|
||||||
|
* Universal Public Domain Dedication.
|
||||||
|
*
|
||||||
|
* The person who associated a work with this deed has dedicated
|
||||||
|
* the work to the public domain by waiving all of his or her rights
|
||||||
|
* to the work worldwide under copyright law, including all related
|
||||||
|
* and neighboring rights, to the extent allowed by law. You can copy,
|
||||||
|
* modify, distribute and perform the work, even for commercial purposes,
|
||||||
|
* all without asking permission.
|
||||||
|
*
|
||||||
|
* The test apps are intended to be adapted for use in your code, which
|
||||||
|
* may be proprietary. So unlike the library itself, they are licensed
|
||||||
|
* Public Domain.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
#define LWS_DLL
|
||||||
|
#define LWS_INTERNAL
|
||||||
|
#include <libwebsockets.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
#include <string.h>
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <io.h>
|
||||||
|
#include <gettimeofday.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
WALK_NONE,
|
||||||
|
WALK_INITIAL,
|
||||||
|
WALK_LIST,
|
||||||
|
WALK_FINAL
|
||||||
|
} e_walk;
|
||||||
|
|
||||||
|
struct per_session_data__lws_status {
|
||||||
|
struct per_session_data__lws_status *next;
|
||||||
|
struct lws *wsi;
|
||||||
|
time_t time_est;
|
||||||
|
char user_agent[256];
|
||||||
|
|
||||||
|
e_walk walk;
|
||||||
|
struct per_session_data__lws_status *walk_next;
|
||||||
|
unsigned char subsequent:1;
|
||||||
|
unsigned char changed_partway:1;
|
||||||
|
unsigned char wss_over_h2:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct per_vhost_data__lws_status {
|
||||||
|
struct per_session_data__lws_status *live_pss_list;
|
||||||
|
struct lws_context *context;
|
||||||
|
struct lws_vhost *vhost;
|
||||||
|
const struct lws_protocols *protocol;
|
||||||
|
int count_live_pss;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
trigger_resend(struct per_vhost_data__lws_status *vhd)
|
||||||
|
{
|
||||||
|
lws_start_foreach_ll(struct per_session_data__lws_status *, pss,
|
||||||
|
vhd->live_pss_list) {
|
||||||
|
if (pss->walk == WALK_NONE) {
|
||||||
|
pss->subsequent = 0;
|
||||||
|
pss->walk_next = vhd->live_pss_list;
|
||||||
|
pss->walk = WALK_INITIAL;
|
||||||
|
} else
|
||||||
|
pss->changed_partway = 1;
|
||||||
|
} lws_end_foreach_ll(pss, next);
|
||||||
|
|
||||||
|
lws_callback_on_writable_all_protocol(vhd->context, vhd->protocol);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* lws-status protocol */
|
||||||
|
|
||||||
|
int
|
||||||
|
callback_lws_status(struct lws *wsi, enum lws_callback_reasons reason,
|
||||||
|
void *user, void *in, size_t len)
|
||||||
|
{
|
||||||
|
struct per_session_data__lws_status *pss =
|
||||||
|
(struct per_session_data__lws_status *)user;
|
||||||
|
struct per_vhost_data__lws_status *vhd =
|
||||||
|
(struct per_vhost_data__lws_status *)
|
||||||
|
lws_protocol_vh_priv_get(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi));
|
||||||
|
char buf[LWS_PRE + 384], ip[24], *start = buf + LWS_PRE - 1, *p = start,
|
||||||
|
*end = buf + sizeof(buf) - 1;
|
||||||
|
int n, m;
|
||||||
|
|
||||||
|
switch (reason) {
|
||||||
|
|
||||||
|
case LWS_CALLBACK_PROTOCOL_INIT:
|
||||||
|
vhd = lws_protocol_vh_priv_zalloc(lws_get_vhost(wsi),
|
||||||
|
lws_get_protocol(wsi),
|
||||||
|
sizeof(struct per_vhost_data__lws_status));
|
||||||
|
vhd->context = lws_get_context(wsi);
|
||||||
|
vhd->protocol = lws_get_protocol(wsi);
|
||||||
|
vhd->vhost = lws_get_vhost(wsi);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_ESTABLISHED:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This shows how to stage sending a single ws message in
|
||||||
|
* multiple fragments. In this case, it lets us trade off
|
||||||
|
* memory needed to make the data vs time to send it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
vhd->count_live_pss++;
|
||||||
|
pss->next = vhd->live_pss_list;
|
||||||
|
vhd->live_pss_list = pss;
|
||||||
|
|
||||||
|
pss->wss_over_h2 = !!len;
|
||||||
|
|
||||||
|
time(&pss->time_est);
|
||||||
|
pss->wsi = wsi;
|
||||||
|
|
||||||
|
if (lws_hdr_copy(wsi, pss->user_agent, sizeof(pss->user_agent),
|
||||||
|
WSI_TOKEN_HTTP_USER_AGENT) < 0) /* too big */
|
||||||
|
strcpy(pss->user_agent, "unknown");
|
||||||
|
trigger_resend(vhd);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_SERVER_WRITEABLE:
|
||||||
|
switch (pss->walk) {
|
||||||
|
case WALK_INITIAL:
|
||||||
|
n = LWS_WRITE_TEXT | LWS_WRITE_NO_FIN;
|
||||||
|
p += lws_snprintf(p, end - p,
|
||||||
|
"{ \"version\":\"%s\","
|
||||||
|
" \"wss_over_h2\":\"%d\","
|
||||||
|
" \"hostname\":\"%s\","
|
||||||
|
" \"wsi\":\"%d\", \"conns\":[",
|
||||||
|
lws_get_library_version(),
|
||||||
|
pss->wss_over_h2,
|
||||||
|
lws_canonical_hostname(vhd->context),
|
||||||
|
vhd->count_live_pss);
|
||||||
|
pss->walk = WALK_LIST;
|
||||||
|
pss->walk_next = vhd->live_pss_list;
|
||||||
|
break;
|
||||||
|
case WALK_LIST:
|
||||||
|
n = LWS_WRITE_CONTINUATION | LWS_WRITE_NO_FIN;
|
||||||
|
if (!pss->walk_next)
|
||||||
|
goto walk_final;
|
||||||
|
|
||||||
|
if (pss->subsequent)
|
||||||
|
*p++ = ',';
|
||||||
|
pss->subsequent = 1;
|
||||||
|
|
||||||
|
m = 0;
|
||||||
|
lws_start_foreach_ll(struct per_session_data__lws_status *,
|
||||||
|
pss2, vhd->live_pss_list) {
|
||||||
|
if (pss2 == pss->walk_next) {
|
||||||
|
m = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} lws_end_foreach_ll(pss2, next);
|
||||||
|
|
||||||
|
if (!m) {
|
||||||
|
/* our next guy went away */
|
||||||
|
pss->walk = WALK_FINAL;
|
||||||
|
pss->changed_partway = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy(ip, "unknown");
|
||||||
|
lws_get_peer_simple(pss->walk_next->wsi, ip, sizeof(ip));
|
||||||
|
p += lws_snprintf(p, end - p,
|
||||||
|
"{\"peer\":\"%s\",\"time\":\"%ld\","
|
||||||
|
"\"ua\":\"%s\"}",
|
||||||
|
ip, (unsigned long)pss->walk_next->time_est,
|
||||||
|
pss->walk_next->user_agent);
|
||||||
|
pss->walk_next = pss->walk_next->next;
|
||||||
|
if (!pss->walk_next)
|
||||||
|
pss->walk = WALK_FINAL;
|
||||||
|
break;
|
||||||
|
case WALK_FINAL:
|
||||||
|
walk_final:
|
||||||
|
n = LWS_WRITE_CONTINUATION;
|
||||||
|
p += lws_snprintf(p, 4, "]}");
|
||||||
|
if (pss->changed_partway) {
|
||||||
|
pss->changed_partway = 0;
|
||||||
|
pss->subsequent = 0;
|
||||||
|
pss->walk_next = vhd->live_pss_list;
|
||||||
|
pss->walk = WALK_INITIAL;
|
||||||
|
} else
|
||||||
|
pss->walk = WALK_NONE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
m = lws_write(wsi, (unsigned char *)start, p - start, n);
|
||||||
|
if (m < 0) {
|
||||||
|
lwsl_err("ERROR %d writing to di socket\n", m);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pss->walk != WALK_NONE)
|
||||||
|
lws_callback_on_writable(wsi);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_RECEIVE:
|
||||||
|
lwsl_notice("pmd test: RX len %d\n", (int)len);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_CLOSED:
|
||||||
|
// lwsl_debug("****** LWS_CALLBACK_CLOSED\n");
|
||||||
|
lws_start_foreach_llp(struct per_session_data__lws_status **,
|
||||||
|
ppss, vhd->live_pss_list) {
|
||||||
|
if (*ppss == pss) {
|
||||||
|
*ppss = pss->next;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} lws_end_foreach_llp(ppss, next);
|
||||||
|
|
||||||
|
trigger_resend(vhd);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LWS_PLUGIN_PROTOCOL_LWS_STATUS \
|
||||||
|
{ \
|
||||||
|
"lws-status", \
|
||||||
|
callback_lws_status, \
|
||||||
|
sizeof(struct per_session_data__lws_status), \
|
||||||
|
512, /* rx buf size must be >= permessage-deflate rx size */ \
|
||||||
|
0, NULL, 0 \
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
|
||||||
|
static const struct lws_protocols protocols[] = {
|
||||||
|
LWS_PLUGIN_PROTOCOL_LWS_STATUS
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
init_protocol_lws_status(struct lws_context *context,
|
||||||
|
struct lws_plugin_capability *c)
|
||||||
|
{
|
||||||
|
if (c->api_magic != LWS_PLUGIN_API_MAGIC) {
|
||||||
|
lwsl_err("Plugin API %d, library API %d", LWS_PLUGIN_API_MAGIC,
|
||||||
|
c->api_magic);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
c->protocols = protocols;
|
||||||
|
c->count_protocols = LWS_ARRAY_SIZE(protocols);
|
||||||
|
c->extensions = NULL;
|
||||||
|
c->count_extensions = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
destroy_protocol_lws_status(struct lws_context *context)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
314
src/plugins/protocol_post_demo.c
Normal file
314
src/plugins/protocol_post_demo.c
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
/*
|
||||||
|
* ws protocol handler plugin for "POST demo"
|
||||||
|
*
|
||||||
|
* Written in 2010-2019 by Andy Green <andy@warmcat.com>
|
||||||
|
*
|
||||||
|
* This file is made available under the Creative Commons CC0 1.0
|
||||||
|
* Universal Public Domain Dedication.
|
||||||
|
*
|
||||||
|
* The person who associated a work with this deed has dedicated
|
||||||
|
* the work to the public domain by waiving all of his or her rights
|
||||||
|
* to the work worldwide under copyright law, including all related
|
||||||
|
* and neighboring rights, to the extent allowed by law. You can copy,
|
||||||
|
* modify, distribute and perform the work, even for commercial purposes,
|
||||||
|
* all without asking permission.
|
||||||
|
*
|
||||||
|
* These test plugins are intended to be adapted for use in your code, which
|
||||||
|
* may be proprietary. So unlike the library itself, they are licensed
|
||||||
|
* Public Domain.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
#define LWS_DLL
|
||||||
|
#define LWS_INTERNAL
|
||||||
|
#include <libwebsockets.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <io.h>
|
||||||
|
#endif
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
struct per_session_data__post_demo {
|
||||||
|
struct lws_spa *spa;
|
||||||
|
char result[LWS_PRE + LWS_RECOMMENDED_MIN_HEADER_SPACE];
|
||||||
|
char filename[64];
|
||||||
|
long file_length;
|
||||||
|
#if !defined(LWS_WITH_ESP32)
|
||||||
|
lws_filefd_type fd;
|
||||||
|
#endif
|
||||||
|
uint8_t completed:1;
|
||||||
|
uint8_t sent_headers:1;
|
||||||
|
uint8_t sent_body:1;
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char * const param_names[] = {
|
||||||
|
"text",
|
||||||
|
"send",
|
||||||
|
"file",
|
||||||
|
"upload",
|
||||||
|
};
|
||||||
|
|
||||||
|
enum enum_param_names {
|
||||||
|
EPN_TEXT,
|
||||||
|
EPN_SEND,
|
||||||
|
EPN_FILE,
|
||||||
|
EPN_UPLOAD,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int
|
||||||
|
file_upload_cb(void *data, const char *name, const char *filename,
|
||||||
|
char *buf, int len, enum lws_spa_fileupload_states state)
|
||||||
|
{
|
||||||
|
struct per_session_data__post_demo *pss =
|
||||||
|
(struct per_session_data__post_demo *)data;
|
||||||
|
#if !defined(LWS_WITH_ESP32)
|
||||||
|
int n;
|
||||||
|
|
||||||
|
(void)n;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
switch (state) {
|
||||||
|
case LWS_UFS_OPEN:
|
||||||
|
lws_strncpy(pss->filename, filename, sizeof(pss->filename));
|
||||||
|
/* we get the original filename in @filename arg, but for
|
||||||
|
* simple demo use a fixed name so we don't have to deal with
|
||||||
|
* attacks */
|
||||||
|
#if !defined(LWS_WITH_ESP32)
|
||||||
|
pss->fd = (lws_filefd_type)(long long)lws_open("/tmp/post-file",
|
||||||
|
O_CREAT | O_TRUNC | O_RDWR, 0600);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case LWS_UFS_FINAL_CONTENT:
|
||||||
|
case LWS_UFS_CONTENT:
|
||||||
|
if (len) {
|
||||||
|
pss->file_length += len;
|
||||||
|
|
||||||
|
/* if the file length is too big, drop it */
|
||||||
|
if (pss->file_length > 100000)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
#if !defined(LWS_WITH_ESP32)
|
||||||
|
n = write((int)(long long)pss->fd, buf, len);
|
||||||
|
lwsl_info("%s: write %d says %d\n", __func__, len, n);
|
||||||
|
#else
|
||||||
|
lwsl_notice("%s: Received chunk size %d\n", __func__, len);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
if (state == LWS_UFS_CONTENT)
|
||||||
|
break;
|
||||||
|
#if !defined(LWS_WITH_ESP32)
|
||||||
|
close((int)(long long)pss->fd);
|
||||||
|
pss->fd = LWS_INVALID_FILE;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case LWS_UFS_CLOSE:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* returns length in bytes
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int
|
||||||
|
format_result(struct per_session_data__post_demo *pss)
|
||||||
|
{
|
||||||
|
unsigned char *p, *start, *end;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
p = (unsigned char *)pss->result + LWS_PRE;
|
||||||
|
start = p;
|
||||||
|
end = p + sizeof(pss->result) - LWS_PRE - 1;
|
||||||
|
|
||||||
|
p += lws_snprintf((char *)p, end -p,
|
||||||
|
"<!DOCTYPE html><html lang=\"en\"><head>"
|
||||||
|
"<meta charset=utf-8 http-equiv=\"Content-Language\" "
|
||||||
|
"content=\"en\"/>"
|
||||||
|
"<title>LWS Server Status</title>"
|
||||||
|
"</head><body><h1>Form results (after urldecoding)</h1>"
|
||||||
|
"<table><tr><td>Name</td><td>Length</td><td>Value</td></tr>");
|
||||||
|
|
||||||
|
for (n = 0; n < (int)LWS_ARRAY_SIZE(param_names); n++) {
|
||||||
|
if (!lws_spa_get_string(pss->spa, n))
|
||||||
|
p += lws_snprintf((char *)p, end - p,
|
||||||
|
"<tr><td><b>%s</b></td><td>0"
|
||||||
|
"</td><td>NULL</td></tr>",
|
||||||
|
param_names[n]);
|
||||||
|
else
|
||||||
|
p += lws_snprintf((char *)p, end - p,
|
||||||
|
"<tr><td><b>%s</b></td><td>%d"
|
||||||
|
"</td><td>%s</td></tr>",
|
||||||
|
param_names[n],
|
||||||
|
lws_spa_get_length(pss->spa, n),
|
||||||
|
lws_spa_get_string(pss->spa, n));
|
||||||
|
}
|
||||||
|
|
||||||
|
p += lws_snprintf((char *)p, end - p,
|
||||||
|
"</table><br><b>filename:</b> %s, "
|
||||||
|
"<b>length</b> %ld",
|
||||||
|
pss->filename, pss->file_length);
|
||||||
|
|
||||||
|
p += lws_snprintf((char *)p, end - p, "</body></html>");
|
||||||
|
|
||||||
|
return (int)lws_ptr_diff(p, start);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
callback_post_demo(struct lws *wsi, enum lws_callback_reasons reason,
|
||||||
|
void *user, void *in, size_t len)
|
||||||
|
{
|
||||||
|
struct per_session_data__post_demo *pss =
|
||||||
|
(struct per_session_data__post_demo *)user;
|
||||||
|
unsigned char *p, *start, *end;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
switch (reason) {
|
||||||
|
case LWS_CALLBACK_HTTP_BODY:
|
||||||
|
/* create the POST argument parser if not already existing */
|
||||||
|
if (!pss->spa) {
|
||||||
|
pss->spa = lws_spa_create(wsi, param_names,
|
||||||
|
LWS_ARRAY_SIZE(param_names), 1024,
|
||||||
|
file_upload_cb, pss);
|
||||||
|
if (!pss->spa)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
pss->filename[0] = '\0';
|
||||||
|
pss->file_length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* let it parse the POST data */
|
||||||
|
if (lws_spa_process(pss->spa, in, (int)len))
|
||||||
|
return -1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_HTTP_BODY_COMPLETION:
|
||||||
|
lwsl_debug("LWS_CALLBACK_HTTP_BODY_COMPLETION: %p\n", wsi);
|
||||||
|
/* call to inform no more payload data coming */
|
||||||
|
lws_spa_finalize(pss->spa);
|
||||||
|
|
||||||
|
pss->completed = 1;
|
||||||
|
lws_callback_on_writable(wsi);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_HTTP_WRITEABLE:
|
||||||
|
if (!pss->completed)
|
||||||
|
break;
|
||||||
|
|
||||||
|
p = (unsigned char *)pss->result + LWS_PRE;
|
||||||
|
start = p;
|
||||||
|
end = p + sizeof(pss->result) - LWS_PRE - 1;
|
||||||
|
|
||||||
|
if (!pss->sent_headers) {
|
||||||
|
n = format_result(pss);
|
||||||
|
|
||||||
|
if (lws_add_http_header_status(wsi, HTTP_STATUS_OK,
|
||||||
|
&p, end))
|
||||||
|
goto bail;
|
||||||
|
|
||||||
|
if (lws_add_http_header_by_token(wsi,
|
||||||
|
WSI_TOKEN_HTTP_CONTENT_TYPE,
|
||||||
|
(unsigned char *)"text/html", 9,
|
||||||
|
&p, end))
|
||||||
|
goto bail;
|
||||||
|
if (lws_add_http_header_content_length(wsi, n, &p, end))
|
||||||
|
goto bail;
|
||||||
|
if (lws_finalize_http_header(wsi, &p, end))
|
||||||
|
goto bail;
|
||||||
|
|
||||||
|
/* first send the headers ... */
|
||||||
|
n = lws_write(wsi, start, lws_ptr_diff(p, start),
|
||||||
|
LWS_WRITE_HTTP_HEADERS);
|
||||||
|
if (n < 0)
|
||||||
|
goto bail;
|
||||||
|
|
||||||
|
pss->sent_headers = 1;
|
||||||
|
lws_callback_on_writable(wsi);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pss->sent_body) {
|
||||||
|
n = format_result(pss);
|
||||||
|
|
||||||
|
n = lws_write(wsi, (unsigned char *)start, n,
|
||||||
|
LWS_WRITE_HTTP_FINAL);
|
||||||
|
|
||||||
|
pss->sent_body = 1;
|
||||||
|
if (n < 0)
|
||||||
|
return 1;
|
||||||
|
goto try_to_reuse;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LWS_CALLBACK_HTTP_DROP_PROTOCOL:
|
||||||
|
/* called when our wsi user_space is going to be destroyed */
|
||||||
|
if (pss->spa) {
|
||||||
|
lws_spa_destroy(pss->spa);
|
||||||
|
pss->spa = NULL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
bail:
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
try_to_reuse:
|
||||||
|
if (lws_http_transaction_completed(wsi))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LWS_PLUGIN_PROTOCOL_POST_DEMO \
|
||||||
|
{ \
|
||||||
|
"protocol-post-demo", \
|
||||||
|
callback_post_demo, \
|
||||||
|
sizeof(struct per_session_data__post_demo), \
|
||||||
|
1024, \
|
||||||
|
0, NULL, 0 \
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined (LWS_PLUGIN_STATIC)
|
||||||
|
|
||||||
|
static const struct lws_protocols protocols[] = {
|
||||||
|
LWS_PLUGIN_PROTOCOL_POST_DEMO
|
||||||
|
};
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
init_protocol_post_demo(struct lws_context *context,
|
||||||
|
struct lws_plugin_capability *c)
|
||||||
|
{
|
||||||
|
if (c->api_magic != LWS_PLUGIN_API_MAGIC) {
|
||||||
|
lwsl_err("Plugin API %d, library API %d", LWS_PLUGIN_API_MAGIC,
|
||||||
|
c->api_magic);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
c->protocols = protocols;
|
||||||
|
c->count_protocols = LWS_ARRAY_SIZE(protocols);
|
||||||
|
c->extensions = NULL;
|
||||||
|
c->count_extensions = 0;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LWS_EXTERN LWS_VISIBLE int
|
||||||
|
destroy_protocol_post_demo(struct lws_context *context)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user