Receiving events #2703
Replies: 3 comments
-
Hi! That's an interesting use-case. From a POSIX/unix point of view, there should be no reason for the call to fail here as opposed to doing it with a regular files. My suspicion would be that the access rights are not allowing the liquidsoap process to access the file. |
Beta Was this translation helpful? Give feedback.
-
Wait my bad, I can reproduce. Let me get back to you! |
Beta Was this translation helpful? Give feedback.
-
Ok, unix/posix Meanwhile, I'd suggest to use |
Beta Was this translation helpful? Give feedback.
-
Hi @toots,
I'm interested in having external processes receive events from liquidsoap, ie onTrack, onFrame, metadata etc. I could make a web request, but having an open stream / socket would be ideal.
I found #2014 but file.open it creates a file by default and it is unclear how to create a named socket, ie /tmp/liqevents.sock
Can you provide a snippet which shows how to have liquidsoap create this socket so that my liq script could then write to it in the on_x events?
PS I tried having an external process create the socket (socat) and gave a+x permissions but liquidsoap still complained it couldn't open the socket with an error
Below is how a normal liq server socket looks like on my system:
Here is what I have created with socat:
In the liq script:
When starting...
Looks like liquidsoap thinks its a file and can't access it, similar to how if I try to cp the socket, bash tells me cannot open for reading - no such device or address.
Tried with the latest 2.1.2 rolling release:
Beta Was this translation helpful? Give feedback.
All reactions