Skip to content

Commit 0bdbeaa

Browse files
committed
rename unix_path to local_socket_path
1 parent 5f5372e commit 0bdbeaa

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/example_unix_socket.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ int main()
1111
return "Hello, world!";
1212
});
1313

14-
std::string unix_path = "example.sock";
15-
unlink(unix_path.c_str());
16-
app.unix_path(unix_path).run();
14+
std::string local_socket_path = "example.sock";
15+
unlink(local_socket_path.c_str());
16+
app.local_socket_path(local_socket_path).run();
1717

1818
}

include/crow/app.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@ namespace crow
346346
}
347347

348348
/// \brief Disable tcp/ip and use unix domain socket instead
349-
self_t& unix_path(std::string path)
349+
self_t& local_socket_path(std::string path)
350350
{
351351
bindaddr_ = path;
352352
use_unix_ = true;
353353
return *this;
354354
}
355355

356356
/// \brief Get the unix domain socket path
357-
std::string unix_path()
357+
std::string local_socket_path()
358358
{
359359
return bindaddr_;
360360
}

tests/unittest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3692,7 +3692,7 @@ TEST_CASE("unix_socket")
36923692

36933693
constexpr const char* socket_path = "unittest.sock";
36943694
unlink(socket_path);
3695-
auto _ = app.unix_path(socket_path).run_async();
3695+
auto _ = app.local_socket_path(socket_path).run_async();
36963696
app.wait_for_server_start();
36973697

36983698
std::string sendmsg = "GET / HTTP/1.0\r\n\r\n";

0 commit comments

Comments
 (0)