#include #include #include #include "YoloDetectServerI.h" #include #include int main(int argc, char **argv) { SAVE_APP_ARGS; ENABLEGLOG(GET_STR_CONFIG("logPath").c_str()); auto ich = Ice::initialize(argc, argv); // std::string identity =ich->getProperties()->getProperty("user.yolo.identity"); // std::string gpuIndex =ich->getProperties()->getProperty("user.gpu.index"); // std::string adapterName = ich->getProperties()->getProperty("user.adapter.name"); // float fthresh = atof(ich->getProperties()->getProperty("user.thresh.detect").c_str()); // appPref.setIntData("gpu.index",atol(gpuIndex.c_str())); // appPref.setFloatData("thresh.detect",fthresh); // auto adapter = ich->createObjectAdapter(adapterName); // adapter->add(new YoloDetectServerI(), Ice::stringToIdentity(identity)); // adapter->activate(); // ich->waitForShutdown(); appPref.setIntData("gpu.index", 0); appPref.setFloatData("thresh.detect", 0.7); IceRpcServer server("yoloServer", 10003, "tcp"); server.setMessageSizeMax(1024 * 1024 * 50); server.setPoolInitSize(5); server.setPoolMaxSize(5); server.runWaitShutDown(); return 0; }