added command line parsing, restartability, and daemonizing to

client.  broke win32 stuff though.  also moved version and
copyright constants into a new file and renamed protocol
version constants.
This commit is contained in:
crs
2002-06-04 11:06:26 +00:00
parent e409c83ef9
commit c3649df304
7 changed files with 371 additions and 41 deletions

View File

@@ -1059,7 +1059,8 @@ void CServer::handshakeClient(void* vsocket)
// say hello
log((CLOG_DEBUG1 "saying hello"));
CProtocolUtil::writef(output.get(), "Synergy%2i%2i",
kMajorVersion, kMinorVersion);
kProtocolMajorVersion,
kProtocolMinorVersion);
output->flush();
// wait for the reply
@@ -1117,7 +1118,7 @@ void CServer::handshakeClient(void* vsocket)
// FIXME -- could print network address if socket had suitable method
log((CLOG_WARN "client \"%s\" has incompatible version %d.%d)", name.c_str(), e.getMajor(), e.getMinor()));
CProtocolUtil::writef(output.get(), kMsgEIncompatible,
kMajorVersion, kMinorVersion);
kProtocolMajorVersion, kProtocolMinorVersion);
}
catch (XBadClient&) {
// client not behaving