The simplest example is in the netreceive object (x_net.c in the Pd source)... you open a socket and call sys_addpollfn to have a callback function added to it. The callback function gets called from the Pd scheduler whenever select() reports that the socket (or other selectable file descriptor) can be read without blocking. Be sure to call sys_rmpollfn() when you're deleted so the callbacks stop coming..
cheers Miller
On Tue, May 16, 2006 at 04:28:47PM +0200, walter jenner wrote:
hello!
can somebody give me a short explanation, what is done if i add a poll function? Can i use it to check if something has been received at a socket?
thx a lot! (and sorry for the stupid question, if it is one :) )
best greetings,
walter
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev