summaryrefslogtreecommitdiff
path: root/training/dtrain
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-03-25 15:23:41 +0100
committerPatrick Simianer <p@simianer.de>2015-03-25 15:23:41 +0100
commit9aa075c79122709d8d5b8adf8c91ebd348eac658 (patch)
tree90d59e442881801fbf51de0ba5a5582c2049d9b3 /training/dtrain
parent4ce8dd5d091d63fcafddb447475ae36f769fd8c5 (diff)
updated network_decoder
Diffstat (limited to 'training/dtrain')
-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