Prepare support for more socket types

This commit is contained in:
momo5502
2024-11-08 20:41:06 +01:00
parent b367db3584
commit a63ae4e782
7 changed files with 251 additions and 73 deletions

View File

@@ -13,6 +13,7 @@ using socklen_t = int;
#define INVALID_SOCKET (SOCKET)(~0)
#define SOCKET_ERROR (-1)
#define GET_SOCKET_ERROR() (errno)
#define closesocket close
#endif
namespace network
@@ -56,5 +57,7 @@ namespace network
int address_family_{AF_UNSPEC};
uint16_t port_ = 0;
SOCKET socket_ = INVALID_SOCKET;
void release();
};
}