<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx</link><description>Hello, my name is Chad Carlin. I'm a software developer on the Winsock Test Team. Among the many improvements to the Winsock API shipping in Vista is the new WSAPoll function. Its primary purpose is to simplify the porting of a sockets application that</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#10356532</link><pubDate>Fri, 05 Oct 2012 12:41:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10356532</guid><dc:creator>Jan Koen Annot</dc:creator><description>&lt;p&gt; For Microsoft, it is a known issue:&lt;/p&gt;
&lt;p&gt;&amp;quot;Windows 8 Bugs 309411 - WSAPoll does not report failed connections&lt;/p&gt;
&lt;p&gt; &amp;nbsp;8/3/2011 6:53 PM Resolved as Won&amp;#39;t Fix by muraris&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Has been like this forever and people are already used to it.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;The recommendation for now is to not use the WSAPoll function it in case you encounter this issue, but rather the other Net-API functions.&amp;quot;&lt;/p&gt;
&lt;p&gt;See &lt;a rel="nofollow" target="_new" href="http://curl.haxx.se/mail/lib-2012-10/0038.html"&gt;curl.haxx.se/.../0038.html&lt;/a&gt; for further discussion.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10356532" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#10160388</link><pubDate>Tue, 03 May 2011 13:21:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10160388</guid><dc:creator>Aris Adamantiadis</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you advise on this ?&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://social.msdn.microsoft.com/Forums/en/wsk/thread/18769abd-fca0-4d3c-9884-1a38ce27ae90"&gt;social.msdn.microsoft.com/.../18769abd-fca0-4d3c-9884-1a38ce27ae90&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We&amp;#39;re bitten by this problem on our project, which makes WSAPoll completely useless. Are there known workarounds ? I&amp;#39;m thinking os putting an arbitrary timeout or going back to good old select (which doesn&amp;#39;t look so buggy).&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Aris&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10160388" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#9875854</link><pubDate>Wed, 19 Aug 2009 21:36:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9875854</guid><dc:creator>Jeff Koftinoff</dc:creator><description>&lt;p&gt;I'm coming in late to this discussion, but the quiet often the best thing to do if you are using c++ is to use the boost::asio networking library. &amp;nbsp;You program it in the style of IO Completion, and the program would work on all platforms regardless if it is internally using select, poll, epoll, or IO completion ports.&lt;/p&gt;
&lt;p&gt;--jeffk++&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9875854" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#9156803</link><pubDate>Sun, 30 Nov 2008 04:36:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9156803</guid><dc:creator>Paul Sheer</dc:creator><description>&lt;P&gt;WSAPoll() vs select() performance -&lt;/P&gt;
&lt;P&gt;I would like to know the performance of WSAPoll() compared to select() on Windows. You see, porting between select() and WSAPoll() is not a major effort. With both functions you inquire before you act.&lt;/P&gt;
&lt;P&gt;Porting to IO completion is a MAJOR change in program design for my application. Here you do the IO action FIRST and then wait for notification that it has happened.&lt;/P&gt;
&lt;P&gt;If you say that WSAPoll() gives substantialy better peformance than select(), then I'll try it. If I know in advance then it will save me a lot of time. That WSAPoll does not work on Windows XP is a huge problem BTW. It means you can't create a portable EXE.&lt;/P&gt;
&lt;P&gt;Any way around this? Is Microsoft going to issue a service pack so XP guys can use this?&lt;/P&gt;
&lt;DIV class=commentowner&gt;This is one of thoose, write a little bit of code to see for yourself if it will help. Generally speaking, the best model is posting recv/sends with completion ports, so if you are going to change models, look at that first. I believe this api is there to help with porting of applications already on the poll model. 
&lt;P&gt;To deal with backwards compatability, I generally attempt to dynamically load any function ptrs that might not be present at startup and then choose my implementation based on the api sets available. Good Luck. -- Ari&lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9156803" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#8998246</link><pubDate>Mon, 13 Oct 2008 19:38:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8998246</guid><dc:creator>JGresham</dc:creator><description>&lt;P&gt;Any articles to point us to settings/config to get apps using the legacy winsock api to work in vista.&lt;/P&gt;
&lt;P&gt;Getting network errors unable to connect to host in vista. &amp;nbsp;Xp and older works fine. &amp;nbsp;But have not found a fix for this and a reset of the catalog does not help.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;DIV class=commentowner&gt;Could this have to do with IPV6 being on by default in Vista? What's do you see in a netmon sniff? 
&lt;P&gt;-- Ari &lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8998246" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#8790135</link><pubDate>Wed, 30 Jul 2008 01:40:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8790135</guid><dc:creator>Avinash</dc:creator><description>&lt;P&gt;Can you please comment on the performance of WSAPoll vs select on win and WSAPoll vs poll on linux.&lt;/P&gt;
&lt;P&gt;I am seeing a perf issue where using select degrades performace by 40%. On linux the performace is almost the same with or without using the poll.&lt;/P&gt;
&lt;P&gt;Thx&lt;/P&gt;
&lt;DIV class=commentowner&gt;Select on Windows is mostly for compatibility not performance. If you are focused on performance and scalability there are better IO models to use. 
&lt;P&gt;-- Ari&lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8790135" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#8355412</link><pubDate>Fri, 04 Apr 2008 04:04:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8355412</guid><dc:creator>3h</dc:creator><description>&lt;P&gt;It is not working on Windows XP + Visual Studio 5.0 as I tested. &lt;/P&gt;
&lt;DIV class=commentowner&gt;&lt;I&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms741669.aspx"&gt;WSAPoll&lt;/A&gt;&amp;nbsp;is Vista and higher (Server 2008)&lt;BR&gt;-- Ari&lt;/I&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8355412" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#1077244</link><pubDate>Tue, 14 Nov 2006 23:11:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1077244</guid><dc:creator>wndpteam</dc:creator><description>&lt;p&gt;Thank you for your thoughtful comments.&lt;/p&gt;
&lt;p&gt;I just double checked that the SOCKADDR_STORAGE structure is isomorphic with the sockaddr structure. It's two benefits are that it is large enough to store v4 or v6 addresses and due to its padding will maintain 64-bit alignment. RFC 2553 at ietf.org has additional recommendations regarding its use.&lt;/p&gt;
&lt;p&gt;As a practical matter, I agree that you should put the socket in to non-blocking mode in case, for example, the size of the send exceeds available buffer space. In the sample shown above, WSAPoll guarantees that the call to send will not block.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1077244" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#1076384</link><pubDate>Tue, 14 Nov 2006 21:33:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1076384</guid><dc:creator>comment</dc:creator><description>&lt;p&gt;You forgot to mention that the socket must be in non-blocking mode before doing the I/O operation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1076384" width="1" height="1"&gt;</description></item><item><title>re: WSAPoll, A new Winsock API to simplify porting poll() applications to Winsock.</title><link>http://blogs.msdn.com/b/wndp/archive/2006/10/26/wsapoll.aspx#1059928</link><pubDate>Sun, 12 Nov 2006 01:47:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1059928</guid><dc:creator>EvanR</dc:creator><description>&lt;p&gt;Actually on BSD and Linux you would use struct addrinfo, which is the preferred method to write ip-agnostic apps. &amp;nbsp;Use that instead of SOCKADDR_STORAGE if you can, then it will work on both platforms.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1059928" width="1" height="1"&gt;</description></item></channel></rss>