Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Carbon
- def initialize(host='192.168.15.179', port=2003)
- @host = host
- @port = port
- puts "[#{Time.now}] Contacting Carbon host at #{host}:#{port}"
- @carbon = TCPSocket.new(host, port)
- end
- def send(msg)
- @carbon.puts(msg)
- end
- def close
- @carbon.close
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement