#include #include #include #include "YoloDetectServerI.h" #include #include int main(int argc, char **argv) { std::cout<<__DATE__<<" "<<__TIME__<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(); // if (argc < 3) { // ERR("argc error"); // return -1; // } int gpuindex = 0; int poolNum = 1; int portNum = 10003; appPref.setIntData("gpu.index", gpuindex); appPref.setFloatData("thresh.detect", 0.85); appPref.setIntData("poolNum", poolNum); IceRpcServer server("yoloServer", portNum, "tcp"); server.setMessageSizeMax(1024 * 1024 * 50); server.setPoolInitSize(1); server.setPoolMaxSize(1); server.runWaitShutDown(); return 0; }