diff options
author | Fernando S <fsahmkow27@gmail.com> | 2022-04-10 23:40:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-10 23:40:54 +0200 |
commit | 4ad6bca31c231ce55268859f8c201372c2895f2d (patch) | |
tree | 899857b4212bceae59956977648a9c0154367dfb /src/core/network | |
parent | Merge pull request #8149 from liamwhite/front-face (diff) | |
parent | service: sfdnsres: Implement DNS address resolution (diff) | |
download | yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.tar yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.tar.gz yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.tar.bz2 yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.tar.lz yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.tar.xz yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.tar.zst yuzu-4ad6bca31c231ce55268859f8c201372c2895f2d.zip |
Diffstat (limited to 'src/core/network')
-rw-r--r-- | src/core/network/network.cpp | 4 | ||||
-rw-r--r-- | src/core/network/sockets.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp index a3e0664b9..0784a165d 100644 --- a/src/core/network/network.cpp +++ b/src/core/network/network.cpp @@ -600,6 +600,10 @@ Errno Socket::SetReuseAddr(bool enable) { return SetSockOpt<u32>(fd, SO_REUSEADDR, enable ? 1 : 0); } +Errno Socket::SetKeepAlive(bool enable) { + return SetSockOpt<u32>(fd, SO_KEEPALIVE, enable ? 1 : 0); +} + Errno Socket::SetBroadcast(bool enable) { return SetSockOpt<u32>(fd, SO_BROADCAST, enable ? 1 : 0); } diff --git a/src/core/network/sockets.h b/src/core/network/sockets.h index 5e39e7c54..caaefce7c 100644 --- a/src/core/network/sockets.h +++ b/src/core/network/sockets.h @@ -67,6 +67,8 @@ public: Errno SetReuseAddr(bool enable); + Errno SetKeepAlive(bool enable); + Errno SetBroadcast(bool enable); Errno SetSndBuf(u32 value); |