<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Asynchronous sockets with ALLEGRO_EVENT_QUEUE</title>
		<link>http://www.allegro.cc/forums/view/607712</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 29 Jun 2011 00:44:39 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just started working with asynchronous sockets today and noticed that the WSAAsyncSelect has a parameter of HWND to send events too. I am pretty sure there&#39;s a function to get the HWND handle from a ALLEGRO_DISPLAY, but not sure what would happen if I registered that <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>Does anyone know a way to get asynchronous sockets to emit events to a ALLEGRO_EVENT_QUEUE?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Addison Elliott)</author>
		<pubDate>Wed, 29 Jun 2011 00:33:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you use the SVN version of Allegro you can use this after registering the hwnd:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">bool</span> net_event<span class="k2">(</span><a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a> <span class="k3">*</span>d, UINT msg, WPARAM w, LPARAM l<span class="k2">)</span>
<span class="k2">{</span>
  <span class="k1">if</span> <span class="k2">(</span>msg <span class="k3">=</span><span class="k3">=</span> WM_SOCKET<span class="k2">)</span>
  <span class="k2">{</span>
    <span class="c">// do something</span>
    <span class="k1">return</span> <span class="k1">true</span><span class="k2">;</span>
  <span class="k2">}</span>
  <span class="k1">return</span> <span class="k1">false</span><span class="k2">;</span>
<span class="k2">}</span>

al_add_win_window_callback<span class="k2">(</span>display, net_event<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Wed, 29 Jun 2011 00:40:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Cool, could that be used for menus as well?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Wed, 29 Jun 2011 00:43:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc/forums/thread/607657/922544#target">http://www.allegro.cc/forums/thread/607657/922544#target</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Wed, 29 Jun 2011 00:44:39 +0000</pubDate>
	</item>
</rss>
