mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 17:15:45 +00:00
Add fixes to webapp
This commit is contained in:
@@ -4,13 +4,13 @@ using namespace Tesses::Framework;
|
|||||||
using namespace Tesses::CrossLang;
|
using namespace Tesses::CrossLang;
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
TF_InitWithConsole();
|
||||||
std::string name = argv[0];
|
std::string name = argv[0];
|
||||||
Tesses::Framework::Filesystem::LocalFilesystem fs;
|
Tesses::Framework::Filesystem::VFSPath exePath=Tesses::Framework::Filesystem::LocalFS->SystemToVFSPath(name);
|
||||||
Tesses::Framework::Filesystem::VFSPath exePath=fs.SystemToVFSPath(name);
|
|
||||||
exePath.MakeAbsolute();
|
exePath.MakeAbsolute();
|
||||||
|
|
||||||
|
|
||||||
TF_InitWithConsole();
|
|
||||||
|
|
||||||
GC gc;
|
GC gc;
|
||||||
gc.Start();
|
gc.Start();
|
||||||
@@ -54,11 +54,16 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
svr.StartAccepting();
|
svr.StartAccepting();
|
||||||
TF_RunEventLoop();
|
TF_RunEventLoop();
|
||||||
TDictionary* _dict;
|
TDictionary* _dict;
|
||||||
|
TClassObject* _co;
|
||||||
if(GetObjectHeap(res,_dict))
|
if(GetObjectHeap(res,_dict))
|
||||||
{
|
{
|
||||||
_dict->CallMethod(ls,"Close",{});
|
_dict->CallMethod(ls,"Close",{});
|
||||||
}
|
}
|
||||||
|
if(GetObjectHeap(res,_co))
|
||||||
|
{
|
||||||
|
_co->CallMethod(ls,"","Close",{});
|
||||||
|
}
|
||||||
TF_Quit();
|
TF_Quit();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -35,4 +35,7 @@ func Tesses.CrossLang.Shell.WebAppTest(dd)
|
|||||||
|
|
||||||
|
|
||||||
Net.Http.ListenSimpleWithLoop(res, port);
|
Net.Http.ListenSimpleWithLoop(res, port);
|
||||||
|
|
||||||
|
res.Close();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,8 @@ func Tesses.CrossLang.Shell.WebApp(dd)
|
|||||||
|
|
||||||
|
|
||||||
Net.Http.ListenSimpleWithLoop(res, port);
|
Net.Http.ListenSimpleWithLoop(res, port);
|
||||||
|
res.Close();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Console.WriteLine($"Could not find web application with name {toolname}.");
|
Console.WriteLine($"Could not find web application with name {toolname}.");
|
||||||
|
|||||||
Reference in New Issue
Block a user