1<html> 2 <head> 3 <meta charset="UTF-8"> 4 <script src="/lws-common.js"></script> 5 <link rel="stylesheet" type="text/css" href="lwsgs.css"/> 6 <script src="lwsgs.js"></script> 7 </head> 8 9 <body class="seats"> 10 <table class="lwsgs"> 11 <tr> 12 <td class="logo"> 13 <img src="lwsgs.svg"> 14 </td> 15 <td class=""> 16 <div id=lwsgs class="lwsgs"></div> 17 </td> 18 <td class="rlogo"> 19 <img src="strict-csp.svg"> 20 </td> 21 </tr> 22 23 <tr><td colspan="3" class="h99"> 24 <table class="c100"><tr> 25 <td class="c"> 26 <span id="nolog" class="group2"> 27 This is a demo application for lws generic-sessions.<br><br> 28 It's a simple messageboard.<br><br> 29 What's interesting about it is there is <b>no serverside scripting</b>,<br> 30 instead client js makes a wss:// connection back to the server<br> 31 and then reacts to JSON from the ws protocol. Sessions stuff is <br> 32 handled by lws generic sessions, making the <a href="https://libwebsockets.org/git/libwebsockets/tree/plugins/generic-sessions/protocol_generic_sessions.c">actual<br> 33 test application</a> <a href="https://libwebsockets.org/git/libwebsockets/tree/plugins/generic-sessions/protocol_lws_messageboard.c">very small</a>.<br><br> 34 And because it's natively websocket, it's naturally connected<br> 35 for dynamic events and easy to maintain. 36 <br><br> 37 Register / Login at the top right to see and create new messages. 38 </span> 39 <span id="logged" class="group2"> 40 <div id="newmsg"> 41 <form action="/msg" method="post" target="hidden"> 42 New message<br> 43 <textarea id="msg" placeholder="type your message here" cols="40" rows="5" name="msg"></textarea><br> 44 <input type="submit" id="send" name="send" disabled=1> 45 </form> 46 </div> 47 </span> 48 <div id="dmessages"> 49 <span id="messages" ></span> 50 </div> 51 <span id="debug" class="group2"></span> 52 </td></tr></table> 53 </td></tr> 54 </table> 55 <iframe name="hidden" class="hidden"></iframe> 56 </body> 57</html> 58