mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-11 12:29:33 +01:00
fixup stuffs for windows
This commit is contained in:
parent
02c7b30cc1
commit
2a3823b4ae
2 changed files with 30 additions and 5 deletions
|
|
@ -953,11 +953,6 @@ Errno Socket::SetSockOpt(SOCKET fd_so, int option, T value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno Socket::Initialize(Domain domain, Type type, Protocol protocol) {
|
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));
|
fd = socket(TranslateDomainToNative(domain), TranslateTypeToNative(type), TranslateProtocolToNative(protocol));
|
||||||
if (fd != INVALID_SOCKET)
|
if (fd != INVALID_SOCKET)
|
||||||
return Errno::SUCCESS;
|
return Errno::SUCCESS;
|
||||||
|
|
@ -1218,15 +1213,30 @@ Errno Socket::SetRcvTimeo(u32 value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno Socket::SetReusePort(u32 value) {
|
Errno Socket::SetReusePort(u32 value) {
|
||||||
|
#ifdef SO_REUSEPORT
|
||||||
return SetSockOpt(fd, SO_REUSEPORT, value);
|
return SetSockOpt(fd, SO_REUSEPORT, value);
|
||||||
|
#else
|
||||||
|
LOG_WARNING(Network, "(stubbed)");
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno Socket::SetTimeStamp(u32 value) {
|
Errno Socket::SetTimeStamp(u32 value) {
|
||||||
|
#ifdef SO_TIMESTAMP
|
||||||
return SetSockOpt(fd, SO_TIMESTAMP, value);
|
return SetSockOpt(fd, SO_TIMESTAMP, value);
|
||||||
|
#else
|
||||||
|
LOG_WARNING(Network, "(stubbed)");
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno Socket::SetAcceptFilter(u32 value) {
|
Errno Socket::SetAcceptFilter(u32 value) {
|
||||||
|
#ifdef SO_ACCEPTFILTER
|
||||||
return SetSockOpt(fd, SO_ACCEPTFILTER, value);
|
return SetSockOpt(fd, SO_ACCEPTFILTER, value);
|
||||||
|
#else
|
||||||
|
LOG_WARNING(Network, "(stubbed)");
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno Socket::SetNonBlock(bool enable) {
|
Errno Socket::SetNonBlock(bool enable) {
|
||||||
|
|
|
||||||
|
|
@ -288,15 +288,30 @@ Errno ProxySocket::SetRcvTimeo(u32 value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno ProxySocket::SetReusePort(u32 value) {
|
Errno ProxySocket::SetReusePort(u32 value) {
|
||||||
|
#ifdef SO_REUSEPORT
|
||||||
return SetSockOpt(fd, SO_REUSEPORT, value);
|
return SetSockOpt(fd, SO_REUSEPORT, value);
|
||||||
|
#else
|
||||||
|
LOG_WARNING(Network, "(stubbed)");
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno ProxySocket::SetTimeStamp(u32 value) {
|
Errno ProxySocket::SetTimeStamp(u32 value) {
|
||||||
|
#ifdef SO_TIMESTAMP
|
||||||
return SetSockOpt(fd, SO_TIMESTAMP, value);
|
return SetSockOpt(fd, SO_TIMESTAMP, value);
|
||||||
|
#else
|
||||||
|
LOG_WARNING(Network, "(stubbed)");
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno ProxySocket::SetAcceptFilter(u32 value) {
|
Errno ProxySocket::SetAcceptFilter(u32 value) {
|
||||||
|
#ifdef SO_ACCEPTFILTER
|
||||||
return SetSockOpt(fd, SO_ACCEPTFILTER, value);
|
return SetSockOpt(fd, SO_ACCEPTFILTER, value);
|
||||||
|
#else
|
||||||
|
LOG_WARNING(Network, "(stubbed)");
|
||||||
|
return Errno::SUCCESS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Errno ProxySocket::SetNonBlock(bool enable) {
|
Errno ProxySocket::SetNonBlock(bool enable) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue