Comments (6)
from websocketd.
thank you so much
i just have a try, it seems not work.
from websocketd.
I looked a little more closely.
The gorilla/websocket library that websocketd uses allows sending a CloseMessage and other control messages, but websocketd doesn't expose an API to use that.
If you attempt to write 0xff, 0x00 or other control codes in the websocket script, websocketd ends up treating that as plain data, and wrapping that in a data packet when sending to the client. This includes the case of passing --binary
to websocketd.
Maybe you can use some app-specific indicator, a normal data packet, for the server to communicate clean closure?
from websocketd.
If you're under linux, you can try to use https://github.com/ctn-malone/websocketd-controller which can be used as a wrapper around your script and will forward stdout, stderr & exit event (which contain the exit code of the wrapped script)
from websocketd.
What is difference that clean:true
would make?
from websocketd.
It’s just an easy way to get json events everytime something is outputted to stdout, stderr or if the program exits. I like the standard way of communicating it provides but I might be a bit biased 😅
Edit: on second thought, I probably misread @asergeyev question (I thought you asked what benefit would be provided by the wrapper)
from websocketd.
Related Issues (20)
- Gputil Failed to initialize NVML: Unknown Error HOT 1
- websocketd with django views HOT 1
- mosquitto_sub as command throwing error "Received message of type that we did not expect..." HOT 1
- How can I use c/c++ as a websocket client rather than server? HOT 2
- Seg fault 11 on M1 Max
- system(); in g++(C++) seems invalid
- Pipe multiple CLI apps to generate a website
- any way to handle the DISCONNECT message ?
- New option for binary websockets
- The wiki has been edited to have a links to ransomware. HOT 2
- Fix wiki
- MIPS compilation?!?
- bash script running on websocketd can't connect to dbus HOT 3
- Ten minute tutorial - confusing HOT 7
- Have you meet websocketd broken automatically ? HOT 1
- Vulnerability of dependency "github.com/gorilla/websocket"
- nodejs handle process.stdin incorrect HOT 1
- Issues with newlines
- How to change framesize?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocketd.