일단 bind까지 구현 완료료
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
#include "precomp.hpp"
|
||||
|
||||
namespace Chattr::log {
|
||||
void critical(gsl::czstring msg, bool bShowDBGMessage);
|
||||
void error(gsl::czstring msg, bool bShowDBGMessage);
|
||||
void critical(gsl::czstring msg, bool bShowDBGMessage = true);
|
||||
void error(gsl::czstring msg, bool bShowDBGMessage = true);
|
||||
}
|
||||
@@ -8,10 +8,12 @@ public:
|
||||
Socket_Init(std::int32_t domain, std::int32_t type, std::int32_t protocol);
|
||||
~Socket_Init();
|
||||
|
||||
operator SOCKET() const;
|
||||
|
||||
void bind(int __fd, const sockaddr *__addr, socklen_t __len);
|
||||
|
||||
Socket_Init(const Socket_Init&) = delete;
|
||||
Socket_Init& operator=(const Socket_Init&) = delete;
|
||||
|
||||
operator SOCKET() const;
|
||||
private:
|
||||
bool valid_ = false;
|
||||
SOCKET sock_ = INVALID_SOCKET;
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <windows.h>
|
||||
#elif __linux__
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#define SOCKET int
|
||||
#define INVALID_SOCKET -1
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user