mirror of https://github.com/quasar/Quasar.git
commit
5103262007
|
@ -310,7 +310,8 @@
|
|||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>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>
|
||||
</PropertyGroup>
|
||||
<!-- 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.
|
||||
|
|
|
@ -256,7 +256,9 @@ public void Listen(ushort port, bool ipv6)
|
|||
if (Socket.OSSupportsIPv6 && ipv6)
|
||||
{
|
||||
_handle = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
|
||||
_handle.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false);
|
||||
// fix for mono compatibility, SocketOptionName.IPv6Only
|
||||
SocketOptionName ipv6only = (SocketOptionName)27;
|
||||
_handle.SetSocketOption(SocketOptionLevel.IPv6, ipv6only, 0);
|
||||
_handle.Bind(new IPEndPoint(IPAddress.IPv6Any, port));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -70,7 +70,7 @@ public static bool CreatePortMap(int port, out int externalPort)
|
|||
Mapping mapping = new Mapping(Protocol.Tcp, port, port);
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
_device.CreatePortMap(mapping);
|
||||
_device.CreatePortMapAsync(mapping);
|
||||
|
||||
if (_mappings.ContainsKey(mapping.PrivatePort))
|
||||
_mappings[mapping.PrivatePort] = mapping;
|
||||
|
@ -102,7 +102,7 @@ public static void DeletePortMap(int port)
|
|||
try
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
_device.DeletePortMap(mapping);
|
||||
_device.DeletePortMapAsync(mapping);
|
||||
}
|
||||
catch (MappingException)
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue