A quick and dirty socket helper library.
Socky::Base.setup do |config| config.host = "somewhere.com" config.port = 12345 config.debug = true config.rescue_retries = 3 config.rescue_classes = [ Socky::Errors::Timeout, Socky::Errors::Socket ] end
sock = Socky::Base.new sock.data << "some data" sock.make!
Block usage is also allowed, socket data will be written at the end of the block.
Socky::Base.send do |data| data << "some data" end # send data
Josh Nesbitt / josh@josh-nesbitt.net / josh-nesbitt.net