Plugin server-status cleanup
authorAndy Green <andy@warmcat.com>
Wed, 13 Jul 2016 03:35:16 +0000 (11:35 +0800)
committerAndy Green <andy@warmcat.com>
Wed, 10 Aug 2016 13:20:23 +0000 (21:20 +0800)
doc/html/md_README.coding.html
doc/html/navtreedata.js
doc/html/navtreeindex0.js
doc/html/navtreeindex1.js
doc/html/navtreeindex2.js
doc/html/navtreeindex3.js
doc/html/navtreeindex4.js
plugins/protocol_lws_server_status.c

index e387406..b17b8a4 100644 (file)
@@ -252,7 +252,24 @@ Operation of LWSMPRO_CALLBACK mounts</h1>
 <p>Access by all methods, eg, GET and POST are handled by the callback.</p>
 <p>protocol-post-demo deals with accepting and responding to the html form that is in the test server HTML.</p>
 <p>When a connection accesses a URL related to a CALLBACK type mount, the connection protocol is changed until the next access on the connection to a URL outside the same CALLBACK mount area. User space on the connection is arranged to be the size of the new protocol user space allocation as given in the protocol struct.</p>
-<p>This allocation is only deleted / replaced when the connection accesses a URL region with a different protocol (or the default protocols[0] if no CALLBACK area matches it). </p>
+<p>This allocation is only deleted / replaced when the connection accesses a URL region with a different protocol (or the default protocols[0] if no CALLBACK area matches it).</p>
+<h1><a class="anchor" id="dim"></a>
+Dimming webpage when connection lost</h1>
+<p>The lws test plugins' html provides useful feedback on the webpage about if it is still connected to the server, by greying out the page if not. You can also add this to your own html easily</p>
+<ul>
+<li><p class="startli">include lws-common.js from your HEAD section</p>
+<p class="startli">&lt;script src="/lws-common.js"&gt;&lt;/script&gt;</p>
+</li>
+<li><p class="startli">dim the page during initialization, in a script section on your page</p>
+<p class="startli">lws_gray_out(true,{'zindex':'499'});</p>
+</li>
+<li><p class="startli">in your ws onOpen(), remove the dimming</p>
+<p class="startli">lws_gray_out(false);</p>
+</li>
+<li><p class="startli">in your ws onClose(), reapply the dimming</p>
+<p class="startli">lws_gray_out(true,{'zindex':'499'}); </p>
+</li>
+</ul>
 </div></div><!-- contents -->
 </div><!-- doc-content -->
 <!-- start footer part -->
index 34b85e0..482fae4 100644 (file)
@@ -64,7 +64,8 @@ var NAVTREE =
       [ "Using lws vhosts", "md_README.coding.html#vhosts", null ],
       [ "How lws matches hostname or SNI to a vhost", "md_README.coding.html#sni", null ],
       [ "Using lws mounts on a vhost", "md_README.coding.html#mounts", null ],
-      [ "Operation of LWSMPRO_CALLBACK mounts", "md_README.coding.html#mountcallback", null ]
+      [ "Operation of LWSMPRO_CALLBACK mounts", "md_README.coding.html#mountcallback", null ],
+      [ "Dimming webpage when connection lost", "md_README.coding.html#dim", null ]
     ] ],
     [ "Notes about generic-sessions Plugin", "md_README.generic-sessions.html", [
       [ "Enabling lwsgs for build", "md_README.generic-sessions.html#gseb", null ],
@@ -134,7 +135,7 @@ var NAVTREEINDEX =
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5ac962efd35abf6c402f9fb14aa14f5016",
 "group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5",
 "libwebsockets_8h.html#a42394a38f08a97420c98127358cfeedbac8f5f992c6615324108cdf931da903be",
-"structlws__polarssl__context.html#ae7e11c9129ff71c7ee71b3b2e320ff27"
+"structlws__polarssl__context.html#a919c33af37aab170f828d954de1fa270"
 ];
 
 var SYNCONMSG = 'click to disable panel synchronisation';
index b81b349..1d19434 100644 (file)
@@ -222,8 +222,8 @@ var NAVTREEINDEX0 =
 "group__context-and-vhost.html#ga98d88c9080fd89c37114363a6474ea73":[9,4,13],
 "group__context-and-vhost.html#gae2134657cdd2ea7a59e13ad314e4c50d":[9,4,9],
 "group__context-and-vhost.html#gae2134657cdd2ea7a59e13ad314e4c50d":[11,0,0,0,107],
-"group__context-and-vhost.html#gaeb12f934bfd178bd2132a9e73fc641da":[9,4,5],
 "group__context-and-vhost.html#gaeb12f934bfd178bd2132a9e73fc641da":[11,0,0,0,64],
+"group__context-and-vhost.html#gaeb12f934bfd178bd2132a9e73fc641da":[9,4,5],
 "group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648":[11,0,0,0,65],
 "group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648":[9,4,6],
 "group__context-and-vhost.html#gga41c2d763f78cc248df3b9f8645dbd2a5a1b2f8bde0f62adc7ebe81b2043f34c0c":[11,0,0,0,23,8],
index f7b82c0..524da74 100644 (file)
@@ -24,8 +24,8 @@ var NAVTREEINDEX1 =
 "group__extensions.html#gaae7169b2cd346b34fa33d0250db2afd0":[11,0,0,0,9],
 "group__extensions.html#gacc9f55936dc165257a2e1f7d47bce89e":[9,5,4],
 "group__extensions.html#gacc9f55936dc165257a2e1f7d47bce89e":[11,0,0,0,25],
-"group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9":[9,5,7],
 "group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9":[11,0,0,0,131],
+"group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9":[9,5,7],
 "group__extensions.html#gae9993815eee72c6070300a0ae2f022d7":[11,0,0,0,26],
 "group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e":[9,5,4,1],
 "group__extensions.html#ggacc9f55936dc165257a2e1f7d47bce89ea1c86adf924c8786a12bee9687094673e":[11,0,0,0,25,1],
@@ -220,8 +220,8 @@ var NAVTREEINDEX1 =
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da10047eb05b5e1c298151dc47a5b44826":[11,0,0,0,32,2],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da115440f272a5d55518adfc8099acfee3":[9,13,0,5],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da115440f272a5d55518adfc8099acfee3":[11,0,0,0,32,8],
-"group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da220d8e8652d9b97fb66e476e2a60ffce":[11,0,0,0,32,9],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da220d8e8652d9b97fb66e476e2a60ffce":[9,13,0,6],
+"group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da220d8e8652d9b97fb66e476e2a60ffce":[11,0,0,0,32,9],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da6e556322ff8f205bf311608f7f6e6559":[11,0,0,0,32,4],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da80e8f169fda236c56bfb795ed62903db":[9,13,0,0],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193da80e8f169fda236c56bfb795ed62903db":[11,0,0,0,32,0],
@@ -234,20 +234,20 @@ var NAVTREEINDEX1 =
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193dafe5a38e940ce56708ac814627e9c0917":[9,13,0,4],
 "group__sending-data.html#gga98b099cf8c1c7e38ad78501f270e193dafe5a38e940ce56708ac814627e9c0917":[11,0,0,0,32,7],
 "group__service.html":[9,0],
-"group__service.html#ga29c246707997ab7a466aa709aecd2d7b":[9,0,1],
 "group__service.html#ga29c246707997ab7a466aa709aecd2d7b":[11,0,0,0,53],
+"group__service.html#ga29c246707997ab7a466aa709aecd2d7b":[9,0,1],
 "group__service.html#ga53e3d0801dfda7960a7249dd559e68a2":[9,0,0],
 "group__service.html#ga53e3d0801dfda7960a7249dd559e68a2":[11,0,0,0,52],
-"group__service.html#ga9b3cc4473fd8848e5bbee7f310712939":[11,0,0,0,129],
 "group__service.html#ga9b3cc4473fd8848e5bbee7f310712939":[9,0,5],
+"group__service.html#ga9b3cc4473fd8848e5bbee7f310712939":[11,0,0,0,129],
 "group__service.html#gad82efa5466d14a9f05aa06416375b28d":[9,0,3],
 "group__service.html#gad82efa5466d14a9f05aa06416375b28d":[11,0,0,0,127],
 "group__service.html#gaebf426eda371ba23642fc11d8e0ace6b":[9,0,4],
 "group__service.html#gaebf426eda371ba23642fc11d8e0ace6b":[11,0,0,0,128],
-"group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8":[11,0,0,0,126],
 "group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8":[9,0,2],
+"group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8":[11,0,0,0,126],
 "group__sha.html":[9,11],
-"group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d":[11,0,0,0,44],
 "group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d":[9,11,0],
+"group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d":[11,0,0,0,44],
 "group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5":[11,0,0,0,135]
 };
index 9546a95..90becfc 100644 (file)
@@ -14,27 +14,27 @@ var NAVTREEINDEX2 =
 "group__smtp.html#ga77fc9b56a1bb39484844981ec375fc29":[9,14,4],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad":[9,14,1,3],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad":[11,0,0,0,34,3],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c":[9,14,1,0],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c":[11,0,0,0,34,0],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5":[9,14,1,8],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c":[9,14,1,0],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5":[11,0,0,0,34,8],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5":[9,14,1,8],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69":[11,0,0,0,34,7],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69":[9,14,1,7],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14":[11,0,0,0,34,6],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14":[9,14,1,6],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14":[11,0,0,0,34,6],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab":[9,14,1,4],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab":[11,0,0,0,34,4],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83":[11,0,0,0,34,5],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83":[9,14,1,5],
-"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d":[9,14,1,2],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83":[11,0,0,0,34,5],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d":[11,0,0,0,34,2],
+"group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d":[9,14,1,2],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933":[9,14,1,1],
 "group__smtp.html#gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933":[11,0,0,0,34,1],
 "group__sock-adopt.html":[9,15],
-"group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b":[9,15,1],
 "group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b":[11,0,0,0,43],
-"group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af":[11,0,0,0,42],
+"group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b":[9,15,1],
 "group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af":[9,15,0],
+"group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af":[11,0,0,0,42],
 "group__timeout.html":[9,3],
 "group__timeout.html#ga2c0aa4b9c3c55bae7b35cbfac3246c87":[11,0,0,0,35],
 "group__timeout.html#gaced9f9237f6172fed9f730a2af51345a":[11,0,0,0,134],
@@ -63,8 +63,8 @@ var NAVTREEINDEX2 =
 "group__usercb.html":[9,16],
 "group__usercb.html#gad4fcb82e68d60ffacca61a3f783a0a2f":[11,0,0,0,7],
 "group__usercb.html#gad4fcb82e68d60ffacca61a3f783a0a2f":[9,16,0],
-"group__usercb.html#gad62860e19975ba4c4af401c3cdb6abf7":[9,16,1],
 "group__usercb.html#gad62860e19975ba4c4af401c3cdb6abf7":[11,0,0,0,19],
+"group__usercb.html#gad62860e19975ba4c4af401c3cdb6abf7":[9,16,1],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a026502768778b8d79d62dd0fe4375fc6":[11,0,0,0,19,17],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a026502768778b8d79d62dd0fe4375fc6":[9,16,1,17],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a0418587d5083bb4850faa438648496ba":[11,0,0,0,19,49],
@@ -80,10 +80,10 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a1df60f314710236f9b53efbf468da768":[11,0,0,0,19,33],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a1df60f314710236f9b53efbf468da768":[9,16,1,33],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a23b90b5e5146e760bc3123ae1fd2a6e5":[11,0,0,0,19,40],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a24d39bf1cfc0bad9d92da9ac1717e439":[11,0,0,0,19,0],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a24d39bf1cfc0bad9d92da9ac1717e439":[9,16,1,0],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2db02fc6e1c17ab62b52109d1aa9d738":[9,16,1,7],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a24d39bf1cfc0bad9d92da9ac1717e439":[11,0,0,0,19,0],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2db02fc6e1c17ab62b52109d1aa9d738":[11,0,0,0,19,7],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2db02fc6e1c17ab62b52109d1aa9d738":[9,16,1,7],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2fce9a8608220f32abbf1422a5498804":[11,0,0,0,19,14],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a2fce9a8608220f32abbf1422a5498804":[9,16,1,14],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a390da3639296660a78cc1a5dcb19037e":[11,0,0,0,19,25],
@@ -103,8 +103,8 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a7e12418eec9bce85735e6460176ab604":[9,16,1,3],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a7ec8e2e9557ee02a4fc9f7dec7e2babc":[11,0,0,0,19,11],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a7ec8e2e9557ee02a4fc9f7dec7e2babc":[9,16,1,11],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a838b18d255c1b94a533287ba302a2eba":[11,0,0,0,19,5],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a838b18d255c1b94a533287ba302a2eba":[9,16,1,5],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a838b18d255c1b94a533287ba302a2eba":[11,0,0,0,19,5],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a8909732521d379179003d97ab7a05428":[11,0,0,0,19,35],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a8909732521d379179003d97ab7a05428":[9,16,1,35],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7a89862929a72bff65257ca1d51a0fce4d":[11,0,0,0,19,52],
@@ -128,26 +128,26 @@ var NAVTREEINDEX2 =
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab69783a9fbf2ca71ad70706bda77b412":[11,0,0,0,19,32],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab69783a9fbf2ca71ad70706bda77b412":[9,16,1,32],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ab884f3d5f8a6126a0d34c0172f5e3725":[11,0,0,0,19,53],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7abbbe7a0a67c5866ca9109d46823fc5b1":[9,16,1,8],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7abbbe7a0a67c5866ca9109d46823fc5b1":[11,0,0,0,19,8],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7abbbe7a0a67c5866ca9109d46823fc5b1":[9,16,1,8],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7abcf9c720cd3d361a83d1ac65bf052a25":[11,0,0,0,19,39],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac11c336f7052abf3618962902a71ebc8":[11,0,0,0,19,54],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac3fc5bbb55e69f90396526287ee84a51":[11,0,0,0,19,38],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac3fc5bbb55e69f90396526287ee84a51":[9,16,1,38],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac432e9f891c733ba8f968c1bf57c0ddc":[11,0,0,0,19,45],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac4c68e00efcf1ff7bda7ada462aff8ae":[11,0,0,0,19,13],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac4c68e00efcf1ff7bda7ada462aff8ae":[9,16,1,13],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac4c68e00efcf1ff7bda7ada462aff8ae":[11,0,0,0,19,13],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ac8c0ae966ef1877e0020c0077ff2e4a4":[11,0,0,0,19,41],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aca834dc035b7f7486f9ce40fde54fe9e":[9,16,1,30],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aca834dc035b7f7486f9ce40fde54fe9e":[11,0,0,0,19,30],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7aca834dc035b7f7486f9ce40fde54fe9e":[9,16,1,30],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7accd8753672d319a30b4b4c2fb775e84d":[11,0,0,0,19,20],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7accd8753672d319a30b4b4c2fb775e84d":[9,16,1,20],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad5d34583e3556e153eda91620b48cc49":[11,0,0,0,19,27],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad5d34583e3556e153eda91620b48cc49":[9,16,1,27],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad724974204d51d688f569c5d387b967d":[11,0,0,0,19,43],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad87774f1c7784cf632e1e2f5b51036e1":[11,0,0,0,19,48],
-"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad8c6207b0c4e732f3d507f0fb79370e8":[11,0,0,0,19,1],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad8c6207b0c4e732f3d507f0fb79370e8":[9,16,1,1],
+"group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ad8c6207b0c4e732f3d507f0fb79370e8":[11,0,0,0,19,1],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7adfb41c92e2522712207ef7f2462b5e34":[11,0,0,0,19,31],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7adfb41c92e2522712207ef7f2462b5e34":[9,16,1,31],
 "group__usercb.html#ggad62860e19975ba4c4af401c3cdb6abf7ae4986291b7a810fe290851d73bebeb1c":[11,0,0,0,19,21],
@@ -176,51 +176,51 @@ var NAVTREEINDEX2 =
 "group__vhost-mounts.html#ga31eca18e50cb4357480f2fcad36ff437":[11,0,0,0,29],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a13ab58b01ac6e05f595977f1e0f0db69":[9,4,0,2,3],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a13ab58b01ac6e05f595977f1e0f0db69":[11,0,0,0,29,3],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a1e9f0842b0e85db50fe648ed4ba9a4b0":[9,4,0,2,0],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a1e9f0842b0e85db50fe648ed4ba9a4b0":[11,0,0,0,29,0],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a42f2361cfe76cd287fa8fcfc502357e2":[11,0,0,0,29,2],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a1e9f0842b0e85db50fe648ed4ba9a4b0":[9,4,0,2,0],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a42f2361cfe76cd287fa8fcfc502357e2":[9,4,0,2,2],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a42f2361cfe76cd287fa8fcfc502357e2":[11,0,0,0,29,2],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a8894d16316863077dfe530963ca59f67":[9,4,0,2,5],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a8894d16316863077dfe530963ca59f67":[11,0,0,0,29,5],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a946a88cf9c852eed2c0317f4115d19da":[9,4,0,2,6],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437a946a88cf9c852eed2c0317f4115d19da":[11,0,0,0,29,6],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437aec137a2434851bd856ceebfb697b9970":[9,4,0,2,4],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437aec137a2434851bd856ceebfb697b9970":[11,0,0,0,29,4],
-"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437afbd10eb4777517ed1f6bfdcf3b9ea1d1":[9,4,0,2,1],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437aec137a2434851bd856ceebfb697b9970":[9,4,0,2,4],
 "group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437afbd10eb4777517ed1f6bfdcf3b9ea1d1":[11,0,0,0,29,1],
+"group__vhost-mounts.html#gga31eca18e50cb4357480f2fcad36ff437afbd10eb4777517ed1f6bfdcf3b9ea1d1":[9,4,0,2,1],
 "group__wsclose.html":[9,17],
-"group__wsclose.html#gaa1c863415d1783cd8de7938aa6efa262":[11,0,0,0,62],
 "group__wsclose.html#gaa1c863415d1783cd8de7938aa6efa262":[9,17,1],
+"group__wsclose.html#gaa1c863415d1783cd8de7938aa6efa262":[11,0,0,0,62],
 "group__wsclose.html#gae399c571df32ba532c0ca67da9284985":[11,0,0,0,22],
 "group__wsclose.html#gae399c571df32ba532c0ca67da9284985":[9,17,0],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a1bb501d212fa4d57053db681b1dfab98":[11,0,0,0,22,3],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a1bb501d212fa4d57053db681b1dfab98":[9,17,0,2],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a2e1f0113494a58e762eed3d22e7080d8":[11,0,0,0,22,10],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a2e1f0113494a58e762eed3d22e7080d8":[9,17,0,9],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a2e1f0113494a58e762eed3d22e7080d8":[11,0,0,0,22,10],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a32c38edab10d1379febac0c479ab2e9c":[11,0,0,0,22,14],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a3ffa38d5081b85fb739e02a747ccf2c4":[11,0,0,0,22,1],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a3ffa38d5081b85fb739e02a747ccf2c4":[9,17,0,0],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a462c99b05459df700919cfd3f53c8276":[11,0,0,0,22,4],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a462c99b05459df700919cfd3f53c8276":[9,17,0,3],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a4b8a3b7ce6f731e5248e4b0fb64a5044":[9,17,0,5],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a462c99b05459df700919cfd3f53c8276":[11,0,0,0,22,4],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a4b8a3b7ce6f731e5248e4b0fb64a5044":[11,0,0,0,22,6],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a68b3d34bebd88547dcfa5cadba0acd6c":[9,17,0,6],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a4b8a3b7ce6f731e5248e4b0fb64a5044":[9,17,0,5],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a68b3d34bebd88547dcfa5cadba0acd6c":[11,0,0,0,22,7],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a7aef2da0062da606eeb35aaca5cf9050":[9,17,0,7],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a68b3d34bebd88547dcfa5cadba0acd6c":[9,17,0,6],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a7aef2da0062da606eeb35aaca5cf9050":[11,0,0,0,22,8],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a7aef2da0062da606eeb35aaca5cf9050":[9,17,0,7],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a9737a68759e739856b150ff9dfa30218":[11,0,0,0,22,2],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985a9737a68759e739856b150ff9dfa30218":[9,17,0,1],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ac6a161822783ee873be1c66f48d14e0e":[11,0,0,0,22,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ac6a161822783ee873be1c66f48d14e0e":[9,17,0,10],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ac6a161822783ee873be1c66f48d14e0e":[11,0,0,0,22,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985acc9a317c70363dd88e823e066b2c73b7":[11,0,0,0,22,0],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad0869604d79e13700ae5d196a431b350":[9,17,0,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad0869604d79e13700ae5d196a431b350":[11,0,0,0,22,12],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad0869604d79e13700ae5d196a431b350":[9,17,0,11],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad09e68295eabdddcba4e332fbea70ae5":[9,17,0,8],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad09e68295eabdddcba4e332fbea70ae5":[11,0,0,0,22,9],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad2b477a91c8445bf34ecd43977f9b390":[9,17,0,12],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985ad2b477a91c8445bf34ecd43977f9b390":[11,0,0,0,22,13],
-"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985af90cb98d983ad3d4c79df9b6f3d4a4d2":[11,0,0,0,22,5],
 "group__wsclose.html#ggae399c571df32ba532c0ca67da9284985af90cb98d983ad3d4c79df9b6f3d4a4d2":[9,17,0,4],
+"group__wsclose.html#ggae399c571df32ba532c0ca67da9284985af90cb98d983ad3d4c79df9b6f3d4a4d2":[11,0,0,0,22,5],
 "group__wsstatus.html":[9,18],
 "group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37":[9,18,3],
 "group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37":[11,0,0,0,105],
index 219460d..f73ea74 100644 (file)
@@ -43,6 +43,7 @@ var NAVTREEINDEX3 =
 "md_README.coding.html#cpp":[4,9],
 "md_README.coding.html#dae":[4,0],
 "md_README.coding.html#debuglog":[4,7],
+"md_README.coding.html#dim":[4,24],
 "md_README.coding.html#ecdh":[4,15],
 "md_README.coding.html#evtloop":[4,2],
 "md_README.coding.html#extopts":[4,18],
@@ -248,6 +249,5 @@ var NAVTREEINDEX3 =
 "structlws__plugin__capability.html#abcf51db969522fdda9aaf902e65739d3":[9,10,2,1],
 "structlws__plugin__capability.html#ae38f7cf1246b9ca3af3cbf9d46b7090f":[9,10,2,2],
 "structlws__polarssl__context.html":[10,0,14],
-"structlws__polarssl__context.html#a1872f2ea24878d807ae20ca8513674af":[10,0,14,0],
-"structlws__polarssl__context.html#a919c33af37aab170f828d954de1fa270":[10,0,14,2]
+"structlws__polarssl__context.html#a1872f2ea24878d807ae20ca8513674af":[10,0,14,0]
 };
index f1d420f..64a59b9 100644 (file)
@@ -1,5 +1,6 @@
 var NAVTREEINDEX4 =
 {
+"structlws__polarssl__context.html#a919c33af37aab170f828d954de1fa270":[10,0,14,2],
 "structlws__polarssl__context.html#ae7e11c9129ff71c7ee71b3b2e320ff27":[10,0,14,1],
 "structlws__pollargs.html":[10,0,15],
 "structlws__pollargs.html#a00bbffea9f55de342783e32d71ce1de6":[10,0,15,0],
@@ -24,12 +25,12 @@ var NAVTREEINDEX4 =
 "structlws__process__html__state.html#af21119890fdfebe28fb5c4dabfc1bdf5":[9,6,1,1,1],
 "structlws__protocol__vhost__options.html":[9,4,0,0],
 "structlws__protocol__vhost__options.html":[9,4,2],
-"structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[9,4,2,3],
 "structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[9,4,0,0,3],
+"structlws__protocol__vhost__options.html#a0640a92513c70ee6b9b295a9ad1658e7":[9,4,2,3],
 "structlws__protocol__vhost__options.html#abc714ddb4171756fc8196e9823a1e21c":[9,4,2,1],
 "structlws__protocol__vhost__options.html#abc714ddb4171756fc8196e9823a1e21c":[9,4,0,0,1],
-"structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[9,4,0,0,0],
 "structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[9,4,2,0],
+"structlws__protocol__vhost__options.html#acf9db77f8eb64cd4e314be9b43d8a8b9":[9,4,0,0,0],
 "structlws__protocol__vhost__options.html#afd99fbc90be51ea2465b550c2ec47822":[9,4,2,2],
 "structlws__protocol__vhost__options.html#afd99fbc90be51ea2465b550c2ec47822":[9,4,0,0,2],
 "structlws__protocols.html":[9,10,1],
@@ -47,10 +48,10 @@ var NAVTREEINDEX4 =
 "structlws__session__info.html#afb924864b70f40372920688a5c1c895e":[9,10,0,2,2],
 "structlws__token__limits.html":[9,6,4,1],
 "structlws__token__limits.html#a6ec712306cbf8585bce7a56758a3ceff":[9,6,4,1,0],
-"structlws__tokens.html":[9,6,4,0],
 "structlws__tokens.html":[9,6,6],
-"structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[9,6,4,0,1],
+"structlws__tokens.html":[9,6,4,0],
 "structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[9,6,6,1],
+"structlws__tokens.html#a855b7375d1d58516c0ecd4b60e9a7766":[9,6,4,0,1],
 "structlws__tokens.html#a9f3635412bc71a5cb78e9862b55f10cd":[9,6,6,0],
 "structlws__tokens.html#a9f3635412bc71a5cb78e9862b55f10cd":[9,6,4,0,0],
 "structlwsgw__hash.html":[9,10,0,1],
index 926623c..baaabaf 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
-#define LWS_SS_VERSIONS 3
+struct lws_ss_load_sample {
+       time_t t;
+       int load_x100;
+};
 
 struct lws_ss_dumps {
        char buf[32768];
        int length;
+
+       struct lws_ss_load_sample load[64];
+       int load_head;
+       int load_tail;
 };
 
-static struct lws_ss_dumps d[LWS_SS_VERSIONS];
-static int last_dump;
+static struct lws_ss_dumps d;
 static uv_timer_t timeout_watcher;
 static struct lws_context *context;
 static int tow_flag;
@@ -51,12 +57,28 @@ uv_timeout_cb_server_status(uv_timer_t *w
 #endif
 )
 {
-       int n;
+       char *p = d.buf + LWS_PRE;
+
+#if 0
+#ifdef LWS_HAVE_GETLOADAVG
+       double l = 0.0;
+
+       getloadavg(&l, 1);
+       d.load[d.load_head].load_x100 = (int)(l * 100);
+       d.load[d.load_head].t = lws_now_secs();
+       d.load_head++;
+       if (d.load_head == ARRAY_SIZE(d.load))
+               d.load_head = 0;
+       if (d.load_head == d.load_tail) {
+               d.load_tail++;
+               if (d.load_tail == ARRAY_SIZE(d.load))
+                       d.load_tail = 0;
+       }
+#endif
+#endif
 
-       last_dump = (last_dump + 1) % LWS_SS_VERSIONS;
-       n = lws_json_dump_context(context, d[last_dump].buf + LWS_PRE,
-                       sizeof(d[0].buf) - LWS_PRE);
-       d[last_dump].length = n;
+       d.length = lws_json_dump_context(context, p,
+                                        sizeof(d.buf) - LWS_PRE);
 
        lws_callback_on_writable_all_protocol(context, &protocols[0]);
 }
@@ -99,16 +121,12 @@ callback_lws_server_status(struct lws *wsi, enum lws_callback_reasons reason,
                break;
 
        case LWS_CALLBACK_SERVER_WRITEABLE:
-               m = lws_write(wsi, (unsigned char *)
-                               d[last_dump].buf + LWS_PRE, d[last_dump].length,
+               m = lws_write(wsi, (unsigned char *)d.buf + LWS_PRE, d.length,
                              LWS_WRITE_TEXT);
                if (m < 0)
                        return -1;
                break;
 
-       case LWS_CALLBACK_RECEIVE:
-               break;
-
        default:
                break;
        }