| | |
| | | // adapter->add(new YoloDetectServerI(), Ice::stringToIdentity(identity)); |
| | | // adapter->activate(); |
| | | // ich->waitForShutdown(); |
| | | appPref.setIntData("gpu.index", 0); |
| | | appPref.setFloatData("thresh.detect", 0.7); |
| | | |
| | | IceRpcServer<YoloDetectServerI> server("yoloServer", 10003, "tcp"); |
| | | if (argc < 3) { |
| | | ERR("argc error"); |
| | | return -1; |
| | | } |
| | | |
| | | int gpuindex = atoi(argv[1]); |
| | | int poolNum = atoi(argv[2]); |
| | | int portNum = atoi(argv[3]); |
| | | |
| | | appPref.setIntData("gpu.index", gpuindex); |
| | | appPref.setFloatData("thresh.detect", 0.7); |
| | | appPref.setIntData("poolNum", poolNum); |
| | | |
| | | IceRpcServer<YoloDetectServerI> server("yoloServer", portNum, "tcp"); |
| | | server.setMessageSizeMax(1024 * 1024 * 50); |
| | | server.setPoolInitSize(5); |
| | | server.setPoolMaxSize(5); |
| | | server.setPoolInitSize(poolNum); |
| | | server.setPoolMaxSize(poolNum); |
| | | server.runWaitShutDown(); |
| | | return 0; |
| | | } |