[PD-dev] help with sys_addpollfn and friends

Miller Puckette mpuckett at imusic1.ucsd.edu
Wed May 17 18:08:35 CEST 2006


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 at iem.at
> http://lists.puredata.info/listinfo/pd-dev




More information about the Pd-dev mailing list