外网细节修改 增加账号

This commit is contained in:
范露尧
2022-10-27 09:28:40 +08:00
parent 2e5e01a35d
commit cc6cdfa714
5 changed files with 61 additions and 22 deletions

View File

@@ -12,17 +12,17 @@ using System.Threading.Tasks;
namespace Getf.Service.Transfer.WinService
{
public partial class Service1 : ServiceBase
{
private Server _Server;
public Service1()
{
InitializeComponent();
}
public partial class Service1 : ServiceBase
{
private Server _Server;
public Service1()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
/*var ipInfo = System.Configuration.ConfigurationManager.AppSettings["IpInfo"].Split(':');
protected override void OnStart(string[] args)
{
/*var ipInfo = System.Configuration.ConfigurationManager.AppSettings["IpInfo"].Split(':');
_Server = new Server();
if (ipInfo[0] != String.Empty)
{
@@ -34,16 +34,19 @@ namespace Getf.Service.Transfer.WinService
}
_Server.Start();*/
var boostrap = BootstrapFactory.CreateBootstrap();
boostrap.Initialize();
boostrap.Start();
}
var boostrap = BootstrapFactory.CreateBootstrap();
boostrap.Initialize();
boostrap.Start();
}
protected override void OnStop()
{
_Server.Stop();
_Server.Dispose();
_Server = null;
}
}
protected override void OnStop()
{
if (_Server != null)
{
_Server.Stop();
_Server.Dispose();
_Server = null;
}
}
}
}