Advertisement
Guest User

Untitled

a guest
Sep 10th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.29 KB | None | 0 0
  1. class Carbon
  2.   def initialize(host='192.168.15.179', port=2003)
  3.     @host = host
  4.     @port = port
  5.     puts "[#{Time.now}] Contacting Carbon host at #{host}:#{port}"
  6.     @carbon = TCPSocket.new(host, port)
  7.   end
  8.  
  9.   def send(msg)
  10.     @carbon.puts(msg)
  11.   end
  12.  
  13.   def close
  14.     @carbon.close
  15.   end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement