From 9aa075c79122709d8d5b8adf8c91ebd348eac658 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Wed, 25 Mar 2015 15:23:41 +0100 Subject: updated network_decoder --- training/dtrain/feed.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'training/dtrain') 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 -- cgit v1.2.3