I am able to send a message to a udp socket in Ruby 1.9x. I need to make this backwards compatible to Ruby 1.8.7, but I am not able to find any documentation on how to do this. Here's what I have for 1.9.x:
require 'socket'
socket = Socket.new(:INET, :DGRAM)
addr = Socket.sockaddr_in(UDP_PORT, UDP_HOST)
socket.connect_nonblock addr
socket.send(some_json_string, 0)
socket.close