NetReactor::NetReactor(const Section &sec) { _fdPool = NULL; _status = IReactor::NONE; _port = (int)atoi((sec.get("listenPort").c_str())); _maxConnected = (int)atoi((sec.get("maxConnect").c_str())); maxConnected = _maxConnected; _logicIP.push_back(sec.get("logicSvr")); _readTimeout = ((int)atoi(sec.get("readTimeout").c_str())); _writeTimeout = ((int)atoi(sec.get("writeTimeout").c_str())); }
int SyncReactor::load(const Section & sec) { _maxEvents = atoi(sec.get("MaxEvents").c_str()); _pNum = atoi(sec.get("ThreadNum").c_str()); if(_extReactor != NULL) { _extReactor->setThread(_pNum); _extReactor->setMaxEvents(_maxEvents); } return 0; }