Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created May 12, 2010 15:09
Show Gist options
  • Save jerodsanto/398693 to your computer and use it in GitHub Desktop.
Save jerodsanto/398693 to your computer and use it in GitHub Desktop.
require 'socket'
address = "192.168.1.80"
port = 12345
begin
t = TCPSocket.new(address, port)
rescue
puts "error: #{$!}"
else
t.print "camera"
answer = t.gets(nil)
t.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment