summaryrefslogtreecommitdiffstats
path: root/src/core/network
diff options
context:
space:
mode:
authortech-ticks <techticksdev@gmail.com>2022-04-07 23:05:50 +0200
committertech-ticks <techticksdev@gmail.com>2022-04-07 23:30:23 +0200
commit1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47 (patch)
tree268176f6ac0c9c4866baa391bfd0221b25df7d2c /src/core/network
parentpatch_manager: Apply layered exefs patches from 'atmosphere' SD directory (diff)
downloadyuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.tar
yuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.tar.gz
yuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.tar.bz2
yuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.tar.lz
yuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.tar.xz
yuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.tar.zst
yuzu-1c3983c12e5df5a2a2f33dadf5e4a2f875fe2f47.zip
Diffstat (limited to 'src/core/network')
-rw-r--r--src/core/network/network.cpp4
-rw-r--r--src/core/network/sockets.h2
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);