mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 08:34:47 +08:00
rename
This commit is contained in:
@@ -24,9 +24,9 @@ template <> struct call_result<void> {
|
||||
rpc_errc ec;
|
||||
};
|
||||
|
||||
class rest_rpc_client {
|
||||
class rpc_client {
|
||||
public:
|
||||
rest_rpc_client() : socket_(get_global_executor()) {}
|
||||
rpc_client() : socket_(get_global_executor()) {}
|
||||
|
||||
auto get_executor() { return socket_.get_executor(); }
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include <string>
|
||||
#include <thread>
|
||||
namespace rest_rpc {
|
||||
class rest_rpc_server {
|
||||
class rpc_server {
|
||||
public:
|
||||
rest_rpc_server(std::string address,
|
||||
size_t num_thread = std::thread::hardware_concurrency())
|
||||
rpc_server(std::string address,
|
||||
size_t num_thread = std::thread::hardware_concurrency())
|
||||
: io_context_pool_(num_thread),
|
||||
acceptor_(io_context_pool_.get_io_context()),
|
||||
check_timer_(io_context_pool_.get_io_context()) {
|
||||
@@ -20,13 +20,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
rest_rpc_server(std::string host, std::string port,
|
||||
size_t num_thread = std::thread::hardware_concurrency())
|
||||
rpc_server(std::string host, std::string port,
|
||||
size_t num_thread = std::thread::hardware_concurrency())
|
||||
: io_context_pool_(num_thread),
|
||||
acceptor_(io_context_pool_.get_io_context()), host_(std::move(host)),
|
||||
port_(std::move(port)),
|
||||
check_timer_(io_context_pool_.get_io_context()) {}
|
||||
~rest_rpc_server() { stop(); }
|
||||
~rpc_server() { stop(); }
|
||||
|
||||
std::error_code start() { return start_impl(false); }
|
||||
|
||||
Reference in New Issue
Block a user