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

**URL:** <https://www.ruby-forum.com/t/hooking-in-to-the-nginx-event-loop-with-something-other-than-tcp/168788>\
**Category:** NGINX\
**Created:** [May 25, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/hooking-in-to-the-nginx-event-loop-with-something-other-than-tcp/168788 "2009-05-25T22:59:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Smith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@Christopher\_Smith](https://www.ruby-forum.com/u/Christopher_Smith)\
**Post date:** [May 25, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/hooking-in-to-the-nginx-event-loop-with-something-other-than-tcp/168788/1 "2009-05-25T22:59:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christopher\_Smith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@Christopher\_Smith](https://www.ruby-forum.com/u/Christopher_Smith)\
**Post date:** [May 26, 2009, 12:56am UTC](https://www.ruby-forum.com/t/hooking-in-to-the-nginx-event-loop-with-something-other-than-tcp/168788/2 "2009-05-26T00:56:08Z")

</div>

_wave_

---

<div class="post-metadata">

**Author:** ![Christopher\_Smith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@Christopher\_Smith](https://www.ruby-forum.com/u/Christopher_Smith)\
**Post date:** [May 26, 2009, 12:59am UTC](https://www.ruby-forum.com/t/hooking-in-to-the-nginx-event-loop-with-something-other-than-tcp/168788/3 "2009-05-26T00:59:39Z")

</div>

Hm, my apologies.  
I need to learn to send replies to _individuals_.  
Not to full lists.

🙂
