summaryrefslogtreecommitdiffstats
path: root/src/core/internal_network/sockets.h
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2023-06-20 03:17:43 +0200
committercomex <comexk@gmail.com>2023-06-25 21:53:31 +0200
commit8e703e08dfcf735a08df2ceff6a05221b7cc981f (patch)
tree771ebe71883ff9e179156f2b38b21b05070d7667 /src/core/internal_network/sockets.h
parentMerge pull request #10825 from 8bitDream/vcpkg-zlib (diff)
downloadyuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.gz
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.bz2
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.lz
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.xz
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.tar.zst
yuzu-8e703e08dfcf735a08df2ceff6a05221b7cc981f.zip
Diffstat (limited to 'src/core/internal_network/sockets.h')
-rw-r--r--src/core/internal_network/sockets.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/internal_network/sockets.h b/src/core/internal_network/sockets.h
index 11e479e50..46a53ef79 100644
--- a/src/core/internal_network/sockets.h
+++ b/src/core/internal_network/sockets.h
@@ -59,10 +59,9 @@ public:
virtual Errno Shutdown(ShutdownHow how) = 0;
- virtual std::pair<s32, Errno> Recv(int flags, std::vector<u8>& message) = 0;
+ virtual std::pair<s32, Errno> Recv(int flags, std::span<u8> message) = 0;
- virtual std::pair<s32, Errno> RecvFrom(int flags, std::vector<u8>& message,
- SockAddrIn* addr) = 0;
+ virtual std::pair<s32, Errno> RecvFrom(int flags, std::span<u8> message, SockAddrIn* addr) = 0;
virtual std::pair<s32, Errno> Send(std::span<const u8> message, int flags) = 0;
@@ -87,6 +86,8 @@ public:
virtual Errno SetNonBlock(bool enable) = 0;
+ virtual std::pair<Errno, Errno> GetPendingError() = 0;
+
virtual bool IsOpened() const = 0;
virtual void HandleProxyPacket(const ProxyPacket& packet) = 0;
@@ -126,9 +127,9 @@ public:
Errno Shutdown(ShutdownHow how) override;
- std::pair<s32, Errno> Recv(int flags, std::vector<u8>& message) override;
+ std::pair<s32, Errno> Recv(int flags, std::span<u8> message) override;
- std::pair<s32, Errno> RecvFrom(int flags, std::vector<u8>& message, SockAddrIn* addr) override;
+ std::pair<s32, Errno> RecvFrom(int flags, std::span<u8> message, SockAddrIn* addr) override;
std::pair<s32, Errno> Send(std::span<const u8> message, int flags) override;
@@ -156,6 +157,11 @@ public:
template <typename T>
Errno SetSockOpt(SOCKET fd, int option, T value);
+ std::pair<Errno, Errno> GetPendingError() override;
+
+ template <typename T>
+ std::pair<T, Errno> GetSockOpt(SOCKET fd, int option);
+
bool IsOpened() const override;
void HandleProxyPacket(const ProxyPacket& packet) override;