mirror of https://github.com/quasar/Quasar.git
Added comment to mono compatibility fix
This commit is contained in:
parent
3c01a99aff
commit
ef1a51ef1b
|
@ -311,7 +311,7 @@
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent Condition="'$(OS)' == 'Windows_NT' ">copy "$(TargetPath)" "$(TargetDir)client.bin" /Y</PostBuildEvent>
|
<PostBuildEvent Condition="'$(OS)' == 'Windows_NT' ">copy "$(TargetPath)" "$(TargetDir)client.bin" /Y</PostBuildEvent>
|
||||||
<PostBuildEvent Condition="'$(OS)' != 'Windows_NT' ">cp "$(TargetPath)" "$(TargetDir)client.bin"</PostBuildEvent>
|
<PostBuildEvent Condition="'$(OS)' != 'Windows_NT' ">cp "$(TargetPath)" "$(TargetDir)client.bin"</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -256,7 +256,9 @@ namespace xServer.Core.Networking
|
||||||
if (Socket.OSSupportsIPv6 && ipv6)
|
if (Socket.OSSupportsIPv6 && ipv6)
|
||||||
{
|
{
|
||||||
_handle = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
|
_handle = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
|
||||||
_handle.SetSocketOption(SocketOptionLevel.IPv6, (SocketOptionName)27, 0);
|
// fix for mono compatibility, SocketOptionName.IPv6Only
|
||||||
|
SocketOptionName ipv6only = (SocketOptionName)27;
|
||||||
|
_handle.SetSocketOption(SocketOptionLevel.IPv6, ipv6only, 0);
|
||||||
_handle.Bind(new IPEndPoint(IPAddress.IPv6Any, port));
|
_handle.Bind(new IPEndPoint(IPAddress.IPv6Any, port));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue