mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 10:01:33 +08:00
Fixed tcp_client
This commit is contained in:
parent
6095db951b
commit
8302086942
@ -54,8 +54,8 @@ public:
|
|||||||
void connect(const std::string &host, int port)
|
void connect(const std::string &host, int port)
|
||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
spdlog::info("Connecting..");
|
struct addrinfo hints
|
||||||
struct addrinfo hints{};
|
{};
|
||||||
memset(&hints, 0, sizeof(struct addrinfo));
|
memset(&hints, 0, sizeof(struct addrinfo));
|
||||||
hints.ai_family = AF_INET; // IPv4
|
hints.ai_family = AF_INET; // IPv4
|
||||||
hints.ai_socktype = SOCK_STREAM; // TCP
|
hints.ai_socktype = SOCK_STREAM; // TCP
|
||||||
|
Loading…
Reference in New Issue
Block a user