Hooking in to the nginx event loop with something other than TCP?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Hooking in to the nginx event loop with something other than TCP?

Christopher Smith-2
I am trying to have a filter module that would query a UDP network
service before altering the output of an HTTP request. If the service
was TCP based, I can see how I'd do this without blocking the worker
thread (the memcached module provides a great example). However, it
seems like the API's for doing this assume that there is a TCP
connection involved. It looks like I even nginx_epoll_add_event() uses
ngx_connection_t, which appears to have some assumptions that it is
working with a connection oriented socket, rather than a packet-based
one. Is there a way to do this?

--Chris

Reply | Threaded
Open this post in threaded view
|

Re: Hooking in to the nginx event loop with something other than TCP?

Avleen Vig
*wave*

On Mon, May 25, 2009 at 9:54 PM, Christopher Smith <[hidden email]> wrote:

> I am trying to have a filter module that would query a UDP network service
> before altering the output of an HTTP request. If the service was TCP based,
> I can see how I'd do this without blocking the worker thread (the memcached
> module provides a great example). However, it seems like the API's for doing
> this assume that there is a TCP connection involved. It looks like I even
> nginx_epoll_add_event() uses ngx_connection_t, which appears to have some
> assumptions that it is working with a connection oriented socket, rather
> than a packet-based one. Is there a way to do this?
>
> --Chris
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Hooking in to the nginx event loop with something other than TCP?

Avleen Vig
Hm, my apologies.
I need to learn to send replies to *individuals*.
Not to full lists.

:-)

On Mon, May 25, 2009 at 11:48 PM, Avleen Vig <[hidden email]> wrote:

> *wave*
>
> On Mon, May 25, 2009 at 9:54 PM, Christopher Smith <[hidden email]> wrote:
>> I am trying to have a filter module that would query a UDP network service
>> before altering the output of an HTTP request. If the service was TCP based,
>> I can see how I'd do this without blocking the worker thread (the memcached
>> module provides a great example). However, it seems like the API's for doing
>> this assume that there is a TCP connection involved. It looks like I even
>> nginx_epoll_add_event() uses ngx_connection_t, which appears to have some
>> assumptions that it is working with a connection oriented socket, rather
>> than a packet-based one. Is there a way to do this?
>>
>> --Chris
>>
>>
>