<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Homo-Adminus Blog - Latest Comments in Using epoll() For Asynchronous Network Programming</title><link>http://homo-adminus.disqus.com/</link><description></description><atom:link href="https://homo-adminus.disqus.com/using_epoll_for_asynchronous_network_programming/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 26 Aug 2008 21:22:57 -0000</lastBuildDate><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460366</link><description>&lt;p&gt;Great write up.  I couldn't find a more detailed example than this.  However, how do you know when a client closes a connection?  It seems that you should be able to check your event against EPOLLHUP but the event number shown when a client closes is 0x5 while EPOLLHUP is defined as 0x10.  So is there some bit masking I have to do?&lt;/p&gt;&lt;p&gt;Thanks,&lt;br&gt;Addisu&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">addisu</dc:creator><pubDate>Tue, 26 Aug 2008 21:22:57 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460367</link><description>&lt;p&gt;занимательно, надо будет py-epoll погонять)&lt;br&gt;тем более сейчас джангу перевёл на асинхронный сервер который использует epoll В)&lt;/p&gt;&lt;p&gt;кстати если не ошибаюсь, результатом C10K problem стал сервер lighttpd&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergey Maranchuk</dc:creator><pubDate>Thu, 31 Jul 2008 09:35:02 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460368</link><description>&lt;p&gt;actually "fd" is not "used" for epolling. The fd is passed separately to epoll_wait, the data structure is used for passing in any data the user requires. As it is a union structure writing to "void *ptr" will overwrite fd.&lt;/p&gt;&lt;p&gt;This data structure is useful for passing in data that may be useful to the user of the data. For example you can cache data that has been gathered by the connection previously and then store this in a structure which the void *ptr points to. When more data is ready you then have access to the previously stored data which you can add to with the further communication.&lt;/p&gt;&lt;p&gt;James&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James</dc:creator><pubDate>Sun, 20 Jul 2008 12:31:23 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460365</link><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Thanks for the info for epoll. These are helpful.&lt;/p&gt;&lt;p&gt;I had one question regarding the user data variable given as part of epoll_event structure. &lt;br&gt;If only "fd" is used for epolling, why are u32/u64 and void pointers provided.&lt;/p&gt;&lt;p&gt;thanks,&lt;br&gt;Prashanth&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Prashanth</dc:creator><pubDate>Mon, 07 Jul 2008 02:32:55 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460364</link><description>&lt;p&gt;Sonny,&lt;br&gt;Just use google's translator. CLick this link to see a translation (should help a little):&lt;br&gt;&lt;a href="http://translate.google.com/translate?hl=en&amp;amp;sl=zh-CN&amp;amp;u=http://zhoulifa.bokee.com/6081520.html&amp;amp;sa=X&amp;amp;oi=translate&amp;amp;resnum=9&amp;amp;ct=result&amp;amp;prev=/search%3Fq%3Depoll%2Bserver%26complete%3D1%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26sa%3DG" rel="nofollow noopener" target="_blank" title="http://translate.google.com/translate?hl=en&amp;amp;sl=zh-CN&amp;amp;u=http://zhoulifa.bokee.com/6081520.html&amp;amp;sa=X&amp;amp;oi=translate&amp;amp;resnum=9&amp;amp;ct=result&amp;amp;prev=/search%3Fq%3Depoll%2Bserver%26complete%3D1%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26sa%3DG"&gt;http://translate.google.com...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mr Mister</dc:creator><pubDate>Tue, 23 Oct 2007 15:08:41 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460363</link><description>&lt;p&gt;I found a website with an epoll example written by zhoulifa(zhoulifa@163.com). Its comments are in chinese, could anyone translate it/document it in english so it will be understood better? &lt;a href="http://zhoulifa.bokee.com/6081520.html" rel="nofollow noopener" target="_blank" title="http://zhoulifa.bokee.com/6081520.html"&gt;http://zhoulifa.bokee.com/6...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Btw, why must it avoid nonblocking on function handle_io_on_socket?  It accessing db like MySQL nonblocking?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sonny</dc:creator><pubDate>Tue, 04 Sep 2007 04:29:57 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460362</link><description>&lt;p&gt;Eranga, yes.&lt;/p&gt;&lt;p&gt;OT: Great tutorial, even though you never declared events.&lt;br&gt;Well done Scoundrel.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MunkeN</dc:creator><pubDate>Sun, 26 Aug 2007 09:42:52 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460361</link><description>&lt;p&gt;Is it possible to use FD (file descriptor) meant for poll() with epoll()?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eranga</dc:creator><pubDate>Thu, 28 Jun 2007 09:15:44 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460360</link><description>&lt;p&gt;Not if you use the aio functions.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nathan Mickulicz</dc:creator><pubDate>Sat, 23 Jun 2007 16:26:53 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460359</link><description>&lt;p&gt;This is exactly what I was looking for, thanks for the great information.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">connection</dc:creator><pubDate>Fri, 27 Oct 2006 12:46:39 -0000</pubDate></item><item><title>Re: Using epoll() For Asynchronous Network Programming</title><link>http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/#comment-2460358</link><description>&lt;p&gt;It should be pointed out that if you use this approach, all code from handle_io_on_socket must avoid blocking no matter what. This can be nearly impossible in an application that's not multi-threaded.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">JoelKatz</dc:creator><pubDate>Fri, 14 Apr 2006 14:15:47 -0000</pubDate></item></channel></rss>