防火墙设置
This commit is contained in:
commit
bcca150aea
2 files changed
+3
-2
No files matched your search
@@ -33,7 +33,7 @@
|
|||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ namespace DyeingComputer.UserClass
|
|||||||
// public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
// public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
public static async Task Main()
|
public static async Task Main()
|
||||||
{
|
{
|
||||||
|
NetFwManger.AllowPort(7789, "TCP");//开放7790端口
|
||||||
NetFwManger.AllowPort(7790,"TCP");//开放7790端口
|
NetFwManger.AllowPort(7790,"TCP");//开放7790端口
|
||||||
TcpService service = new TcpService();
|
TcpService service = new TcpService();
|
||||||
service.Connecting = (client, e) => { return EasyTask.CompletedTask; };//有客户端正在连接
|
service.Connecting = (client, e) => { return EasyTask.CompletedTask; };//有客户端正在连接
|
||||||
@@ -892,7 +893,7 @@ namespace DyeingComputer.UserClass
|
|||||||
await service.SetupAsync(new TouchSocketConfig()//载入配置
|
await service.SetupAsync(new TouchSocketConfig()//载入配置
|
||||||
.SetMaxBufferSize(1024 * 1024 * 100)
|
.SetMaxBufferSize(1024 * 1024 * 100)
|
||||||
.SetMinBufferSize(1024 * 1024)
|
.SetMinBufferSize(1024 * 1024)
|
||||||
.SetListenIPHosts(new IPHost[] { new IPHost("tcp://127.0.0.1:7789"), new IPHost(7790) })//同时监听两个地址
|
.SetListenIPHosts(new IPHost[] { new IPHost(7789), new IPHost(7790) })//同时监听两个地址
|
||||||
.ConfigureContainer(a =>//容器的配置顺序应该在最前面
|
.ConfigureContainer(a =>//容器的配置顺序应该在最前面
|
||||||
{
|
{
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user