diff options
author | bunnei <bunneidev@gmail.com> | 2022-08-16 20:49:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 20:49:33 +0200 |
commit | 6f931d49c74017fb66bf285dd060bc455ae05c85 (patch) | |
tree | 8d0d47e28d1f35a2a97664a14dccb94e9a96fbb5 /src/core/internal_network/network.h | |
parent | Merge pull request #8104 from Docteh/them_icons (diff) | |
parent | core/socket_proxy: Final nits (diff) | |
download | yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.tar yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.tar.gz yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.tar.bz2 yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.tar.lz yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.tar.xz yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.tar.zst yuzu-6f931d49c74017fb66bf285dd060bc455ae05c85.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/internal_network/network.h | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/src/core/internal_network/network.h b/src/core/internal_network/network.h index 10e5ef10d..36994c22e 100644 --- a/src/core/internal_network/network.h +++ b/src/core/internal_network/network.h @@ -8,6 +8,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" +#include "common/socket_types.h" #ifdef _WIN32 #include <winsock2.h> @@ -17,6 +18,7 @@ namespace Network { +class SocketBase; class Socket; /// Error code for network functions @@ -31,46 +33,11 @@ enum class Errno { HOSTUNREACH, NETDOWN, NETUNREACH, + TIMEDOUT, + MSGSIZE, OTHER, }; -/// Address families -enum class Domain { - INET, ///< Address family for IPv4 -}; - -/// Socket types -enum class Type { - STREAM, - DGRAM, - RAW, - SEQPACKET, -}; - -/// Protocol values for sockets -enum class Protocol { - ICMP, - TCP, - UDP, -}; - -/// Shutdown mode -enum class ShutdownHow { - RD, - WR, - RDWR, -}; - -/// Array of IPv4 address -using IPv4Address = std::array<u8, 4>; - -/// Cross-platform sockaddr structure -struct SockAddrIn { - Domain family; - IPv4Address ip; - u16 portno; -}; - /// Cross-platform poll fd structure enum class PollEvents : u16 { @@ -86,7 +53,7 @@ enum class PollEvents : u16 { DECLARE_ENUM_FLAG_OPERATORS(PollEvents); struct PollFD { - Socket* socket; + SocketBase* socket; PollEvents events; PollEvents revents; }; |