summaryrefslogtreecommitdiff
path: root/training
diff options
context:
space:
mode:
Diffstat (limited to 'training')
-rwxr-xr-xtraining/dtrain/feed.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/training/dtrain/feed.rb b/training/dtrain/feed.rb
index fe8dd509..5f45edfb 100755
--- a/training/dtrain/feed.rb
+++ b/training/dtrain/feed.rb
@@ -2,12 +2,14 @@
require 'nanomsg'
-port = ARGV[0]
+#port = ARGV[0]
+port = 60666
sock = NanoMsg::PairSocket.new
addr = "tcp://127.0.0.1:#{port}"
-sock.bind addr
+#addr = "ipc:///tmp/network_decoder.ipc"
+sock.connect addr
-puts sock.recv
+#puts sock.recv
while true
line = STDIN.gets
if !line
@@ -16,7 +18,7 @@ while true
end
sock.send line.strip
sleep 1
- sock.recv
- sock.send "a=1 b=2"
+ puts "got translation: #{sock.recv}\n\n"
+ #sock.send "a=1 b=2"
end