Пример #1
0
IseOptions::IseOptions()
{
    setLogFileName(getAppSubPath("log") + changeFileExt(getAppExeName(false), ".log"), false);
    setIsDaemon(true);
    setAllowMultiInstance(false);

    setServerType(DEF_SERVER_TYPE);
    setAssistorThreadCount(DEF_ASSISTOR_THREAD_COUNT);

    setUdpServerPort(DEF_UDP_SERVER_PORT);
    setUdpListenerThreadCount(DEF_UDP_LISTENER_THREAD_COUNT);
    setUdpRequestGroupCount(DEF_UDP_REQ_GROUP_COUNT);
    for (int i = 0; i < DEF_UDP_REQ_GROUP_COUNT; i++)
    {
        setUdpRequestQueueCapacity(i, DEF_UDP_REQ_QUEUE_CAPACITY);
        setUdpWorkerThreadCount(i, DEF_UDP_WORKER_THREADS_MIN, DEF_UDP_WORKER_THREADS_MAX);
    }
    setUdpRequestMaxWaitTime(DEF_UDP_REQ_MAX_WAIT_TIME);
    setUdpWorkerThreadTimeout(DEF_UDP_WORKER_THREAD_TIMEOUT);
    setUdpRequestQueueAlertLine(DEF_UDP_QUEUE_ALERT_LINE);
    setUdpAdjustThreadInterval(DEF_UDP_ADJUST_THREAD_INTERVAL);

    setTcpServerCount(DEF_TCP_SERVER_COUNT);
    for (int i = 0; i < DEF_TCP_SERVER_COUNT; i++)
        setTcpServerPort(i, DEF_TCP_SERVER_PORT);
    for (int i = 0; i < DEF_TCP_SERVER_COUNT; i++)
        setTcpServerEventLoopCount(i, DEF_TCP_SERVER_EVENT_LOOP_COUNT);
    setTcpClientEventLoopCount(DEF_TCP_CLIENT_EVENT_LOOP_COUNT);
    setTcpMaxRecvBufferSize(DEF_TCP_MAX_RECV_BUFFER_SIZE);
}
Пример #2
0
void Environment::xmlConfigure(xmlNode *fNode)
{
  int fEmbeddedSkin = 0;
  while (fNode) {
    if (!strcmp((char *) fNode->name, "Menu")) {
      SubMenuNode *t = new SubMenuNode();
      t->xmlConfigure(fNode->children);
      setTopMenu(t);
      setCurrentMenu(t);
    } else if (!strcmp((char *) fNode->name, "Resources")) {
      Resources *t = new Resources();
      t->xmlConfigure(fNode->children);
      setResources(t);
      fEmbeddedSkin = 1;
    } else if (!strcmp((char *) fNode->name, "Elements")) {
      Elements *t = new Elements();
      t->xmlConfigure(fNode->children);
      setElements(t);
      fEmbeddedSkin = 1;
    } else if (!strcmp((char *) fNode->name, "Dialog")) {
      Generic *t = new Generic();
      t->xmlConfigure(fNode->children);
      setDialog(t);
    } else if (!strcmp((char *) fNode->name, "LogFile")) {
      setLogFileName((char *) fNode->children->content);
    }
    fNode = fNode->next;
  }
  if (fEmbeddedSkin) {
    mResources->loadResources();
    mElements->associateResources(mResources);
  }
}
Пример #3
0
 void LogConfig::setOutputFile(char const *path)
 {
     setLogFileName(path);
 }