Embedded Web Server
websrv provides a simple web server for embedded applications using libwebsockets.
It simply creates a websocket server on an available port, and starts a web browser locally to point back at it. The file name given as an argument is farmed out as well as any other requested files. It also supports switching to websockets mode, wherein callback is called to receive messages (default: WebRecv()).
When the last connection is dropped, the websrv delete itself, after the timeout delay (default: 10 seconds).
websrv can be invoked directly by calling the autoload function jsi_websrv(files,opts).
|port||8765||Port to listen on|
You can find the source for websrv in the jsi/lib subdirectory. For convenience, here is a link to the [42ce24f6574c88ea|websrv source from jsish 1.0.6].
The source: ../lib/Jsi_Websrv.jsi