[Live-devel] multiple instances of live555 library

Stas Oskin stas.oskin at gmail.com
Mon Aug 24 16:10:18 PDT 2009


Hi.

Thanks for the explanation.

2009/8/25 Jerry Johns <Jerry.Johns at nuvation.com>

>  The LiveMedia library uses the magical world of select(), which allows
> for monitoring multiple file handle descriptors (or in this case, sockets)
> to monitor for incoming/outgoing data.
>
> By blocking on this select() call, an event loop can process multiple
> socket handles in a single execution context, effectively giving the
> impression of multi-threaded behaviour.
>

I had a vague idea of how it works, and after your explanation have read
this article:
http://www.lowtek.com/sockets/select.html

LiveMedia has a scheduler that you registers a function callback with a
> specific socket handle. A basic pseudo code would be:
>
>
>
> loop:
>
> {
>
> select(descriptor set) à Blocking call
>
> for each SET file handle in descriptor set
>
>        look up corresponding function handler.
>
>        Invoke handler
>
> end for
>
> }
>
>
That's what I don't get - how the scheduler handles incoming data? It forks
new processes to handle it (unlikely)?
Or it just tried to process the data as fast as possible in a single loop?

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090825/e17354ed/attachment.html>


More information about the live-devel mailing list