From: Robert Klemme Date: 2010-12-15T21:08:45+09:00 Subject: Re: How to do UDP calls On Wed, Dec 15, 2010 at 11:17 AM, Luis G. wrote: > Hey guys... > > I have a question here and maybe someone can help me. > > I wrote a script to get information from some websites. Basically I call > an url and I get a file as response. I'm using Mechanize to do that, > like this: > > @agent = Mechanize.new do |a| >      a.history.max_size = 1 >      a.read_timeout = 60 > end > > res = @agent.get(url).save_as(path) > > After I get the file, I just need to open and extract the information I > need. Everything is working good. > > My problem now is that I have some UDP urls and Mechanize does not > support UDP urls... > > So, my question is, how can I get the files from UDP urls? > I looked online for gems to do that, but I didn't find anything... > Any of you can help me? The standard library has basic UDP functionality already. http://www.ruby-doc.org/stdlib/libdoc/socket/rdoc/classes/UDPSocket.html Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/