renamed stop to halt in some context.

renamed start to execute in TcpServer
This commit is contained in:
2019-11-12 07:55:32 +00:00
parent ae997bb477
commit af7852ee6c
19 changed files with 72 additions and 72 deletions

View File

@ -246,7 +246,7 @@ static int setsignal (int sig, void(*handler)(int), int restart)
static void stop_run (int sig)
{
int e = errno;
if (app_awk) app_awk->stop ();
if (app_awk) app_awk->halt ();
errno = e;
}
#endif

View File

@ -200,7 +200,7 @@ int main (int argc, char* argv[])
case '?':
case ':':
print_usage (qse_basenameasmbs(argv[0]));
print_usage (qse_mbsbasename(argv[0]));
return -1;
}
}

View File

@ -71,7 +71,7 @@ public:
// TODO: don't call stop() if this processs is a guardian
// though it's no harm to call stop().
QSE_APP_LOG3 (this, QSE_LOG_INFO, QSE_T("requesting to stop server...app %p server %p - pid %d\n"), this, &this->server, (int)getpid());
this->server.stop();
this->server.halt();
break;
}
}
@ -100,7 +100,7 @@ public:
QSE_APP_LOG0 (this, QSE_LOG_INFO, QSE_T(" <tcpsvr01r> "));
QSE_APP_LOG0 (this, QSE_LOG_INFO, QSE_T("started\n"));
this->server.setThreadStackSize (256000);
return this->server.start (QSE_T("[::]:9998,0.0.0.0:9998"));
return this->server.execute(QSE_T("[::]:9998,0.0.0.0:9998"));
}
return -1;
}

View File

@ -107,16 +107,16 @@ static int test1 (void)
server.setThreadStackSize (256000);
g_server = &server;
//server.start (QSE_T("0.0.0.0:9998"));
server.start (QSE_T("[::]:9998,0.0.0.0:9998"));
//server.start (QSE_T("[fe80::1c4:a90d:a0f0:d52%wlan0]:9998,0.0.0.0:9998"));
//server.execute (QSE_T("0.0.0.0:9998"));
server.execute (QSE_T("[::]:9998,0.0.0.0:9998"));
//server.execute (QSE_T("[fe80::1c4:a90d:a0f0:d52%wlan0]:9998,0.0.0.0:9998"));
g_server = QSE_NULL;
return 0;
}
static void handle_sigint (int sig)
{
if (g_server) g_server->stop ();
if (g_server) g_server->halt ();
}
int main ()