summaryrefslogtreecommitdiff
path: root/word-aligner
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-05-12 17:46:56 +0200
committerPatrick Simianer <p@simianer.de>2015-05-12 17:46:56 +0200
commit6c0fcee726662285e7c4cb3857ca28296f5c525c (patch)
tree77de036e546e79b60db0b60e7e273eb2e8b50e3f /word-aligner
parente0bb79a01ed07cce540e5ebb757e03d801ca287e (diff)
integrated updating grammars
Diffstat (limited to 'word-aligner')
-rw-r--r--word-aligner/net_fa.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/word-aligner/net_fa.cc b/word-aligner/net_fa.cc
index 4d5e20d5..b07799fc 100644
--- a/word-aligner/net_fa.cc
+++ b/word-aligner/net_fa.cc
@@ -75,6 +75,8 @@ int main(int argc, char** argv) {
sock.bind(url.c_str());
int to = 100;
sock.setsockopt(NN_SOL_SOCKET, NN_RCVTIMEO, &to, sizeof (to));
+ string hello = "hello";
+ sock.send(hello.c_str(), hello.size()+1, 0);
while (true)
{
@@ -85,6 +87,8 @@ int main(int argc, char** argv) {
string line(buf, buf+sz);
if (line == "shutdown") {
cerr << "shutting down" << endl;
+ string shutdown = "off";
+ sock.send(shutdown.c_str(), shutdown.size()+1, 0);
break;
}
cerr << "got '" << line << "'" << endl;
@@ -121,7 +125,7 @@ int main(int argc, char** argv) {
ss << ' ' << (a_j - 1) << '-' << j;
}
string a = ss.str();
- cerr << "sending '" << a << "'" << endl;
+ cerr << "sending " << a << endl;
sock.send(a.c_str(), a.size()+1, 0);
} // loop