This commit is contained in:
snltty
2024-12-29 20:38:37 +08:00
parent 9ef71ce4cb
commit ec8e407cde
358 changed files with 5909 additions and 5231 deletions

View File

@@ -70,6 +70,10 @@ namespace linker.libs.extends
}
public static void ReuseBind(this Socket socket, IPEndPoint ip)
{
if(ip.AddressFamily == AddressFamily.InterNetworkV6)
{
socket.IPv6Only(ip.AddressFamily,false);
}
socket.Reuse(true);
socket.Bind(ip);
}