Use IPV4 in the webapp example

This commit is contained in:
an-tao 2019-03-25 23:28:22 +08:00
parent 9b6259837d
commit 798861a1cc
2 changed files with 3 additions and 3 deletions

View File

@ -98,8 +98,8 @@ int main()
{
std::cout << banner << std::endl;
app().addListener("::1", 8848);
//app().addListener("0.0.0.0", 8848);
//app().addListener("::1", 8848);
app().addListener("0.0.0.0", 8848);
#ifdef USE_OPENSSL
//https
drogon::HttpAppFramework::instance().setSSLFiles("server.pem", "server.pem");

View File

@ -629,7 +629,7 @@ int main(int argc, char *argv[])
do
{
std::promise<int> pro1;
auto client = HttpClient::newHttpClient("::1", 8848, false, loop[0].getLoop());
auto client = HttpClient::newHttpClient("127.0.0.1", 8848, false, loop[0].getLoop());
doTest(client, pro1);
#ifdef USE_OPENSSL
std::promise<int> pro2;