summaryrefslogtreecommitdiff
path: root/feed.rb
diff options
context:
space:
mode:
Diffstat (limited to 'feed.rb')
-rwxr-xr-xfeed.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/feed.rb b/feed.rb
index 58e3f78b..a925d31c 100755
--- a/feed.rb
+++ b/feed.rb
@@ -1,12 +1,16 @@
#!/usr/bin/env ruby
require 'nanomsg'
+require 'trollop'
+
+conf = Trollop::options do
+ opt :addr, "URL of socket", :type => :string, :short => '-a', :default => "tcp://127.0.0.1:31337"
+end
-port = 8888
sock = NanoMsg::PairSocket.new
-addr = "tcp://127.0.0.1:#{port}"
+addr = conf[:addr]
sock.connect addr
-puts sock.recv
+puts "< got #{sock.recv}"
while true
line = STDIN.gets