You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using SMWebServer;
|
|
using Sog;
|
|
|
|
namespace SMWebServer
|
|
{
|
|
public class Program
|
|
{
|
|
public static SyncHttpServerService m_httpService = new SyncHttpServerService();
|
|
public static void Main(string[] args)
|
|
{
|
|
long iNow = DateTimeOffset.Now.ToUnixTimeSeconds();
|
|
|
|
bool bServerRunMode = false;
|
|
|
|
try
|
|
{
|
|
AppParam appParam = new AppParam(args,true);
|
|
|
|
if(appParam.RunMode == AppRunMode.Start)
|
|
{
|
|
bServerRunMode = true;
|
|
}
|
|
SMWebServerApp entry = new SMWebServerApp(appParam);
|
|
entry.Start(m_httpService);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
if(bServerRunMode)
|
|
{
|
|
TraceLog.Exception(ex,true);
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine(ex.Message);
|
|
Console.WriteLine(ex.StackTrace);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|