Socket monitoring, event loop and non blocking io
Socket monitoring, event loop and non blocking io
I dont get it. How to monitor a nonblockig socket in a correct MPD style? Idea is to implemenent a mixer plugin for Sonos. Plugin should discover and control Sonos devices: set MPD http server as Sones input, volume and mute control. My question is how to manage nonblocking tcp socket io with MPD. Any help or source fragments are welche.
Re: Socket monitoring, event loop and non blocking io
Derive from `class SocketMonitor`: https://github.com/MusicPlayerDaemon/MP ... onitor.hxx
... and implement the virtual method `OnSocketReady()`.
Call `Schedule*()` to start polling for events, and `Cancel()` to stop polling.
... and implement the virtual method `OnSocketReady()`.
Call `Schedule*()` to start polling for events, and `Cancel()` to stop polling.