websocketj--随时随地在Web浏览器中操作你的服务端程序

网友投稿 758 2022-10-29

websocketj--随时随地在Web浏览器中操作你的服务端程序

websocketj--随时随地在Web浏览器中操作你的服务端程序

websocketj

redirect the STDIN/STDOUT from server side to web browser. you can operate/monitor the server side program in browser. https://cnblogs.com/xiaozhi_5638/p/8760351.html

details

the websocketj can hook other process's STDIN and STDOUT, any message received from remote websocket client will be wrriten into process's STDIN, and any output from process's STDOUT will be sent to remote websocket client.

the websocketj is written by Java, can run on Windows(tested on Windows 10), Linux(tested on CentOS 6.5) and other platforms. the websocketj can work fine with any processes as long as the processes surpport STDIN and STDOUT, so it can be developed by Java, Go, Python, C#, Lua, Ruby, Scala and any other languages, all depends on you!

websocketj also surpports static web server, you can visit static resources such as html, images, js and css from it, just give a listen port as startup parameter(--ssport)!

how to use

Step1: develop your serverside program, MUST surpport stdin/stdout. you can use any language on any platform, java, go, C#, C++ and etc, depends on yourself.Step2: develop your frontend program(html), CAN receive data from backend and send data to it with WebSocket technology.Step3: put your html(css/js/image) static resources into a directory on the server, say /usr/local/websocketj/html/.Step4: start the websocketj with parameters, say websocketj --wsport=8081 --ssport=8082 --staticDir=/usr/local/websocketj/html/ yourprogram args....Step5: visit the html page via any web browser that surpports WebSocket protocal. Now you can operate the serverside program with your local browser!

startup paramters

--wsport: websocket server port. --ssport: static web server port. --staticDir: the static resource directory.

after the websocketj started successfully, input http://ip:ssport/ (http://192.168.3.74:8082/) in your browser location bar, you will see the welcome page!

demo

waiting for update...

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:设计模式-备忘录模式
下一篇:BraTS18——多模态MR图像脑肿瘤分割挑战赛续4
相关文章

 发表评论

暂时没有评论,来抢沙发吧~