mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-21 15:28:19 +00:00
fixup stuffs for windows
This commit is contained in:
@@ -953,11 +953,6 @@ Errno Socket::SetSockOpt(SOCKET fd_so, int option, T value) {
|
||||
}
|
||||
|
||||
Errno Socket::Initialize(Domain domain, Type type, Protocol protocol) {
|
||||
if (type == Type::STREAM && protocol == Protocol::UDP) {
|
||||
LOG_WARNING(Network, "Using IPPROTO_UDP with SOCK_STREAM");
|
||||
type = Type::DGRAM;
|
||||
}
|
||||
|
||||
fd = socket(TranslateDomainToNative(domain), TranslateTypeToNative(type), TranslateProtocolToNative(protocol));
|
||||
if (fd != INVALID_SOCKET)
|
||||
return Errno::SUCCESS;
|
||||
@@ -1218,15 +1213,30 @@ Errno Socket::SetRcvTimeo(u32 value) {
|
||||
}
|
||||
|
||||
Errno Socket::SetReusePort(u32 value) {
|
||||
#ifdef SO_REUSEPORT
|
||||
return SetSockOpt(fd, SO_REUSEPORT, value);
|
||||
#else
|
||||
LOG_WARNING(Network, "(stubbed)");
|
||||
return Errno::SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
Errno Socket::SetTimeStamp(u32 value) {
|
||||
#ifdef SO_TIMESTAMP
|
||||
return SetSockOpt(fd, SO_TIMESTAMP, value);
|
||||
#else
|
||||
LOG_WARNING(Network, "(stubbed)");
|
||||
return Errno::SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
Errno Socket::SetAcceptFilter(u32 value) {
|
||||
#ifdef SO_ACCEPTFILTER
|
||||
return SetSockOpt(fd, SO_ACCEPTFILTER, value);
|
||||
#else
|
||||
LOG_WARNING(Network, "(stubbed)");
|
||||
return Errno::SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
Errno Socket::SetNonBlock(bool enable) {
|
||||
|
||||
@@ -288,15 +288,30 @@ Errno ProxySocket::SetRcvTimeo(u32 value) {
|
||||
}
|
||||
|
||||
Errno ProxySocket::SetReusePort(u32 value) {
|
||||
#ifdef SO_REUSEPORT
|
||||
return SetSockOpt(fd, SO_REUSEPORT, value);
|
||||
#else
|
||||
LOG_WARNING(Network, "(stubbed)");
|
||||
return Errno::SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
Errno ProxySocket::SetTimeStamp(u32 value) {
|
||||
#ifdef SO_TIMESTAMP
|
||||
return SetSockOpt(fd, SO_TIMESTAMP, value);
|
||||
#else
|
||||
LOG_WARNING(Network, "(stubbed)");
|
||||
return Errno::SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
Errno ProxySocket::SetAcceptFilter(u32 value) {
|
||||
#ifdef SO_ACCEPTFILTER
|
||||
return SetSockOpt(fd, SO_ACCEPTFILTER, value);
|
||||
#else
|
||||
LOG_WARNING(Network, "(stubbed)");
|
||||
return Errno::SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
Errno ProxySocket::SetNonBlock(bool enable) {
|
||||
|
||||
Reference in New Issue
Block a user