joewalnes / websocketd

Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
http://websocketd.com/
BSD 2-Clause "Simplified" License
17.14k stars 1.01k forks source link

websocketd output miss #355

Closed Dustyposa closed 5 years ago

Dustyposa commented 5 years ago

I didn't get I wanted output by websocketd. I directly run bellow script, output is: cmdline: /usr/local/bin/python3 -ubq ./show.py

this is backend!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
this is a file 0
this is a file 1
this is a file 2

But when i run websocketd, missed some output. cmdline: ./websocketd --port=8080 python3 -ubq ./show.py Output in html:

this is a file 0
this is a file 1
this is a file 2

Why missed some output?

Dustyposa commented 5 years ago

Oh I got it. But how can I know it's time to send msg? When websocketd catch stdin, but didn't send msg to frontend? Can websocketd can send a flag to frontend when catch stdin.

asergeyev commented 5 years ago

I wonder if you could share your HTML code. IMO things should not be missed. Could you share your HTML code perhaps?

asergeyev commented 5 years ago

Any news, @Dustyposa ?

Dustyposa commented 5 years ago

@asergeyev Oh,sorry. I had forgot this thing. Now,it's greate for me. Thanks.