Hi,
I would like to create a new module. This module has to read an external file descriptor and call a callback. I don't want to use extra process and shared memory or something like that.
Is it possible to add FD in the main Select and call my callback ?
Regards,
Hello,
On 12/8/09 12:27 PM, Olivier Détour wrote:
Hi,
I would like to create a new module. This module has to read an external file descriptor
read from where? Is it at startup time or at runtime?
and call a callback.
Execute the callback when something comes on FD?
I don't want to use extra process and shared memory or something like that.
Is it possible to add FD in the main Select and call my callback ?
select is used only for tcp (tls), otherwise is simple read from upd socket. You have to create an extra process.
Cheers, Daniel
2009/12/8 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 12/8/09 12:27 PM, Olivier Détour wrote:
Hi,
I would like to create a new module. This module has to read an external file descriptor
read from where? Is it at startup time or at runtime?
and call a callback.
Execute the callback when something comes on FD?
I have a FD from a socket. If a SIP message comes, it writes on the FD. But I don't wait for the response. I have to be notified of a response on this socket. Is it possible to add a fd and a callback in an internal polling process without a fork (I want to avoid problems of communication between original process and the child) ?
Regards,
On 12/8/09 2:57 PM, Olivier Détour wrote:
2009/12/8 Daniel-Constantin Mierlamiconda@gmail.com:
Hello,
On 12/8/09 12:27 PM, Olivier Détour wrote:
Hi,
I would like to create a new module. This module has to read an external file descriptor
read from where? Is it at startup time or at runtime?
and call a callback.
Execute the callback when something comes on FD?
I have a FD from a socket. If a SIP message comes, it writes on the FD. But I don't wait for the response. I have to be notified of a response on this socket. Is it possible to add a fd and a callback in an internal polling process without a fork (I want to avoid problems of communication between original process and the child) ?
it is not possible. You can look at xmpp module for an similar example of what you need.
Cheers, Daniel