On 5/28/10, Francesco Vollero <ravenz / o2.ie> wrote:
> Hi,
>
> as in the object i need to realize a simple IPv6 multicast client. And I
> already do it with some troubles but solved.
> Now, i've to make something that every N seconds, i.e. 10s , store the
> data sampled until that moment and start doing other operations, but i
> dont have to stop the sampling action. The sampling operation have to be
> like a while true.
> I dont have any clue to accomplish that. I was thinkin to use
> eventmachine but i dont know if i can apply my custom setsockopts and i
> did not find any documentation about it.

Um, maybe use threads? EventMachine ought to work too, but I can't
speak to that.

What is this sampling that you're doing? What kind of samples are they
and more importantly, where do they come from? You're gonna need some
kind of (hardware or software) buffering in order to ensure that no
samples get lost. The size of that buffer lets you know how long your
program can 'go away' and do other things (like network i/o) before
you start losing data.

HTH