mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fix Socket constants on Linux
This commit is contained in:
parent
df3f7f3d06
commit
a4e438bca6
1 changed files with 8 additions and 2 deletions
|
@ -166,9 +166,15 @@ namespace System.Net
|
||||||
public const int SOCK_DGRAM = 2;
|
public const int SOCK_DGRAM = 2;
|
||||||
public const int IPPROTO_TCP = 6;
|
public const int IPPROTO_TCP = 6;
|
||||||
public const int IPPROTO_UDP = 17;
|
public const int IPPROTO_UDP = 17;
|
||||||
|
#if BF_PLATFORM_WINDOWS
|
||||||
public const int SOL_SOCKET = 0xffff;
|
public const int SOL_SOCKET = 0xffff;
|
||||||
public const int SO_REUSEADDR = 0x0004;
|
public const int SO_REUSEADDR = 0x0004;
|
||||||
public const int SO_BROADCAST = 0x0020;
|
public const int SO_BROADCAST = 0x0020;
|
||||||
|
#else
|
||||||
|
public const int SOL_SOCKET = 1;
|
||||||
|
public const int SO_REUSEADDR = 2;
|
||||||
|
public const int SO_BROADCAST = 6;
|
||||||
|
#endif
|
||||||
public const IPv4Address INADDR_ANY = default;
|
public const IPv4Address INADDR_ANY = default;
|
||||||
|
|
||||||
#if BF_PLATFORM_WINDOWS
|
#if BF_PLATFORM_WINDOWS
|
||||||
|
@ -618,4 +624,4 @@ namespace System.Net
|
||||||
return .Ok;
|
return .Ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue