|
|
|
@ -54,8 +54,8 @@ public:
|
|
|
|
|
void connect(const std::string &host, int port)
|
|
|
|
|
{
|
|
|
|
|
close();
|
|
|
|
|
spdlog::info("Connecting..");
|
|
|
|
|
struct addrinfo hints{};
|
|
|
|
|
struct addrinfo hints
|
|
|
|
|
{};
|
|
|
|
|
memset(&hints, 0, sizeof(struct addrinfo));
|
|
|
|
|
hints.ai_family = AF_INET; // IPv4
|
|
|
|
|
hints.ai_socktype = SOCK_STREAM; // TCP
|
|
|
|
|