Commits


remove unused control_imsg_relay


switch from libevent to a smaller, thin wrapper around poll() libevent is a very cool library, I like its APIs and enjoy using it. However, for amused it is maybe a bit too much since it doesn't deal with too many file descriptors. Amused only needs to monitor one fd for the player process and the currently connected clients. Given that it runs per-user locally, having more than a dozen of fds open is very, very rare.


refactor control_notify it's awkward to call it with the address of the imsgev struct inside the ctl_conn struct. Just relay the info to every client in monitor mode. After all, if a client is in monitor mode *and* issues commands, it's not strange that they're echoed back (note that this is currently impossible, the command line client can either issue commands or be in monitor mode.)


add a monitor functionality this pings all the "interesting" events to clients that issued a IMSG_CTL_MONITOR, except to the one that generated such event.


initial commit