Skip to content

Instantly share code, notes, and snippets.

@gmcintire
Created September 19, 2010 16:01
Show Gist options
  • Save gmcintire/586862 to your computer and use it in GitHub Desktop.
Save gmcintire/586862 to your computer and use it in GitHub Desktop.
require 'socket' # Sockets are in standard library
hostname = 'texas.aprs2.net'
#hostname = 'first.aprs.net'
port = 14580
begin
s = TCPSocket.open(hostname, port)
rescue
puts "error: #{$!}"
else
s.print("user KC5VQD-RB pass -1 vers RubyAPRS 0.1 filter r/33.25/-96.5/200\n\n")
while line = s.gets # Read lines from the socket
puts line.chop # And print with platform line terminator
end
s.close # Close the socket when done
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment