diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/network/network.cpp | 9 | ||||
-rw-r--r-- | src/core/network/network.h | 5 | ||||
-rw-r--r-- | src/core/network/network_interface.cpp | 5 | ||||
-rw-r--r-- | src/core/network/network_interface.h | 5 | ||||
-rw-r--r-- | src/core/network/sockets.h | 7 |
5 files changed, 16 insertions, 15 deletions
diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp index a3e0664b9..fdafbea92 100644 --- a/src/core/network/network.cpp +++ b/src/core/network/network.cpp @@ -1,6 +1,5 @@ -// Copyright 2020 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include <algorithm> #include <cstring> @@ -600,6 +599,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/network.h b/src/core/network/network.h index e85df3ab7..10e5ef10d 100644 --- a/src/core/network/network.h +++ b/src/core/network/network.h @@ -1,6 +1,5 @@ -// Copyright 2020 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/core/network/network_interface.cpp b/src/core/network/network_interface.cpp index 6811f21b1..15ecc6abf 100644 --- a/src/core/network/network_interface.cpp +++ b/src/core/network/network_interface.cpp @@ -1,6 +1,5 @@ -// Copyright 2021 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include <algorithm> #include <fstream> diff --git a/src/core/network/network_interface.h b/src/core/network/network_interface.h index 980edb2f5..9b98b6b42 100644 --- a/src/core/network/network_interface.h +++ b/src/core/network/network_interface.h @@ -1,6 +1,5 @@ -// Copyright 2021 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/core/network/sockets.h b/src/core/network/sockets.h index 5e39e7c54..f889159f5 100644 --- a/src/core/network/sockets.h +++ b/src/core/network/sockets.h @@ -1,6 +1,5 @@ -// Copyright 2020 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -67,6 +66,8 @@ public: Errno SetReuseAddr(bool enable); + Errno SetKeepAlive(bool enable); + Errno SetBroadcast(bool enable); Errno SetSndBuf(u32 value); |