[fix]修正UdpServer在接收广播时连续启动接收的错误,在StarAgent中,此时可能收到广播包,SocketFlags是Broadcast,需要清空,否则报错“参考的对象类型不支持尝试的操作”; 无需设置SocketOptionName.PacketInformation,在ReceiveMessageFromAsync时会自动设置,并且支持ipv6;
石头 编写于 2024-10-10 00:36:00 石头 提交于 2024-10-10 00:45:43
X
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>false</IsPackable>
    <RootNamespace>XUnitTest</RootNamespace>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <DefineConstants>TRACE</DefineConstants>
    <OutputPath>..\Bin\UnitTest</OutputPath>
    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)'=='Debug'">
    <DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
  </PropertyGroup>
  <ItemGroup>
    <Compile Remove="Applications\**" />
    <Compile Remove="Expressions\**" />
    <Compile Remove="Json\**" />
    <Compile Remove="Remoting\**" />
    <Compile Remove="TestEntity\**" />
    <Compile Remove="Yun\**" />
    <EmbeddedResource Remove="Applications\**" />
    <EmbeddedResource Remove="Expressions\**" />
    <EmbeddedResource Remove="Json\**" />
    <EmbeddedResource Remove="Remoting\**" />
    <EmbeddedResource Remove="TestEntity\**" />
    <EmbeddedResource Remove="Yun\**" />
    <None Remove="Applications\**" />
    <None Remove="Expressions\**" />
    <None Remove="Json\**" />
    <None Remove="Remoting\**" />
    <None Remove="TestEntity\**" />
    <None Remove="Yun\**" />
  </ItemGroup>
  <ItemGroup>
    <Compile Remove="Algorithms\LTOBDownSamplingTests.cs" />
    <Compile Remove="Algorithms\LttbDownSamplingTests.cs" />
    <Compile Remove="Caching\RedisTest.cs" />
    <Compile Remove="Collections\BloomFilterTests.cs" />
    <Compile Remove="Http\HttpCodecTests.cs" />
    <Compile Remove="Model\HostTests.cs" />
    <Compile Remove="PacketTest.cs" />
    <Compile Remove="PageParameterTest.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Remove="IO\excel.xlsx" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Yun\OssClientTests.cs" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="IO\excel.xlsx" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />
    <PackageReference Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
    <PackageReference Include="Moq" Version="4.20.70" />
    <PackageReference Include="NewLife.Modbus" Version="1.8.2024.217" />
    <PackageReference Include="NewLife.UnitTest" Version="1.0.2023.1204" />
    <PackageReference Include="xunit" Version="2.9.0" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\NewLife.Core\NewLife.Core.csproj" />
    <ProjectReference Include="..\NewLife.Security\NewLife.Security.csproj" />
  </ItemGroup>
  <ItemGroup>
    <None Update="Algorithms\sampled.csv">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="Algorithms\source2.csv">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="Algorithms\source.csv">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="appsettings.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </None>
    <None Update="Http\leaf.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="Serialization\StarAgent.config">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
</Project>