in reply to tail file and websocket stream

It does seem to be working for me:

$ websocat ws://0.0.0.0:8080 line :hello line :world line :line 3 line :nice line :to line :meet line :you

Were you expecting the log to be streamed right when you connect? The way you wrote your server, you need to send a utf8 message to the server to trigger the event. Note that I pressed enter after starting websocat.

Hope this helps!

Jim

πάντων χρημάτων μέτρον έστιν άνθρωπος.

Replies are listed 'Best First'.
Re^2: tail file and websocket stream
by leostereo (Beadle) on Nov 08, 2018 at 19:09 UTC
    Hi , thanks for your response. The file im tailing is /var/log/messages. When doing:
    tail -f /var/log/messages | websocat -s 172.20.4.210:8080
    Works good , as soon Is I connect, I begin receiving messages. Regards.