<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: eventmachine code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 12 Oct 2008 13:38:19 GMT</pubDate>
    <description>DZone Snippets: eventmachine code</description>
    <item>
      <title>Getting a client's IP address with EventMachine</title>
      <link>http://snippets.dzone.com/posts/show/5098</link>
      <description>This is from, and by: &lt;a href="http://nhw.pl/wp/2007/12/07/eventmachine-how-to-get-clients-ip-address/"&gt;http://nhw.pl/wp/2007/12/07/eventmachine-how-to-get-clients-ip-address/&lt;/a&gt; .. I just wanted a more permanent reference as it's cool code.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;EventMachine::run {&lt;br /&gt;   EventMachine::open_datagram_socket $conf[:address],&lt;br /&gt;                                 $conf[:udp_port], CustomServer&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;module CustomServer&lt;br /&gt;   def receive_data d&lt;br /&gt;      pp get_peername[2,6].unpack "nC4"&lt;br /&gt;   end&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 03 Feb 2008 20:12:09 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5098</guid>
      <author>peter (Peter Cooperx)</author>
    </item>
  </channel>
</rss>
