-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow printing to a server connection #544
Comments
Hi, Would you mind describing the functionality a bit more? Are you talking about an existing server connection or a connection you would also open and close? |
So here's the basicis of the script I'm using:
So I have an external program that opens the unix domain socket that this script created. Right now, in this external program, I push commands to it and read responses using a simplistic model (no select multiplexing yet, etc.). At the moment, due to this simple model, I poll liquidsoap through this socket to see how big the song queue is and how long the current song has left to play. What I'd like to accomplish is to move to an event driven model. To do that, I have to somehow get the Does this help? |
commands. Tentative implementation for #544
* Add server.wait() and server.partial_write to write interactive commands. Tentative implementation for #544 * Use broadcast not signal. * Fix return type. * Fix bytes. * Add server.pause/server.write in the same fashion as if/then/else. * s/partial_write/write/g * Even better syntax. * Cleanup, doc. * Added read API, documentation.
Done now! See: http://www.liquidsoap.info/doc-dev/server.html |
Awesome! I like the condition variable stuff too. Thank you! |
I was unable to find any print command that prints arbitrary text to a unix domain socket server connection. Thus I am unable to use the
on_end
callback to print a message to the server when the song is about to change. This forces my other software to poll the server repeatedly rather than wait for an IO event.Is it possible to add a command that will print text to a server connection?
The text was updated successfully, but these errors were encountered: