├── .vscode ├── c_cpp_properties.json └── settings.json ├── CMakeLists.txt ├── README.md ├── autobuild.sh ├── bin ├── 2021-4-15_log.txt ├── 2021-4-16_log.txt ├── client ├── provider └── rpc.conf ├── build ├── CMakeCache.txt ├── CMakeFiles │ ├── 3.10.2 │ │ ├── CMakeCCompiler.cmake │ │ ├── CMakeCXXCompiler.cmake │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ ├── CMakeSystem.cmake │ │ ├── CompilerIdC │ │ │ ├── CMakeCCompilerId.c │ │ │ └── a.out │ │ └── CompilerIdCXX │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ └── a.out │ ├── CMakeDirectoryInformation.cmake │ ├── CMakeOutput.log │ ├── Makefile.cmake │ ├── Makefile2 │ ├── TargetDirectories.txt │ ├── cmake.check_cache │ ├── feature_tests.bin │ ├── feature_tests.c │ ├── feature_tests.cxx │ └── progress.marks ├── Makefile ├── cmake_install.cmake ├── example │ ├── CMakeFiles │ │ ├── CMakeDirectoryInformation.cmake │ │ └── progress.marks │ ├── Makefile │ ├── callee │ │ ├── CMakeFiles │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ ├── progress.marks │ │ │ └── provider.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── UserService.cpp.o │ │ │ │ ├── __ │ │ │ │ └── src │ │ │ │ │ └── User.pb.cc.o │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ ├── Makefile │ │ └── cmake_install.cmake │ ├── caller │ │ ├── CMakeFiles │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ ├── client.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── CallUserService.cpp.o │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── __ │ │ │ │ │ └── src │ │ │ │ │ │ └── User.pb.cc.o │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ └── progress.marks │ │ ├── Makefile │ │ └── cmake_install.cmake │ ├── cmake_install.cmake │ └── src │ │ ├── CMakeFiles │ │ ├── CMakeDirectoryInformation.cmake │ │ └── progress.marks │ │ ├── Makefile │ │ └── cmake_install.cmake └── src │ ├── CMakeFiles │ ├── CMakeDirectoryInformation.cmake │ ├── progress.marks │ └── rpc.dir │ │ ├── CXX.includecache │ │ ├── DependInfo.cmake │ │ ├── RpcApplication.cpp.o │ │ ├── RpcChannel.cpp.o │ │ ├── RpcConfigure.cpp.o │ │ ├── RpcControl.cpp.o │ │ ├── RpcHeader.pb.cc.o │ │ ├── RpcLogger.cpp.o │ │ ├── RpcProvider.cpp.o │ │ ├── ZookeeperClient.cpp.o │ │ ├── build.make │ │ ├── cmake_clean.cmake │ │ ├── cmake_clean_target.cmake │ │ ├── depend.internal │ │ ├── depend.make │ │ ├── flags.make │ │ ├── link.txt │ │ └── progress.make │ ├── Makefile │ └── cmake_install.cmake ├── example ├── CMakeLists.txt ├── callee │ ├── CMakeLists.txt │ └── UserService.cpp ├── caller │ ├── CMakeLists.txt │ └── CallUserService.cpp ├── include │ └── User.pb.h ├── proto │ └── User.proto └── src │ ├── CMakeLists.txt │ └── User.pb.cc ├── lib ├── include │ ├── LoggerQueue.hpp │ ├── RpcApplication.hpp │ ├── RpcChannel.hpp │ ├── RpcConfigure.hpp │ ├── RpcControl.hpp │ ├── RpcHeader.pb.h │ ├── RpcLogger.hpp │ ├── RpcProvider.hpp │ └── ZookeeperClient.hpp └── librpc.a ├── src ├── CMakeLists.txt ├── RpcApplication.cpp ├── RpcChannel.cpp ├── RpcConfigure.cpp ├── RpcControl.cpp ├── RpcHeader.pb.cc ├── RpcLogger.cpp ├── RpcProvider.cpp ├── ZookeeperClient.cpp ├── include │ ├── LoggerQueue.hpp │ ├── RpcApplication.hpp │ ├── RpcChannel.hpp │ ├── RpcConfigure.hpp │ ├── RpcControl.hpp │ ├── RpcHeader.pb.h │ ├── RpcLogger.hpp │ ├── RpcProvider.hpp │ └── ZookeeperClient.hpp └── proto │ └── RpcHeader.proto └── test └── protobuf ├── main ├── main.cpp ├── test.pb.cc ├── test.pb.h ├── test.proto └── test2.proto /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "compilerPath": "/usr/bin/gcc", 10 | "cStandard": "gnu11", 11 | "cppStandard": "gnu++14", 12 | "intelliSenseMode": "linux-gcc-x64", 13 | "configurationProvider": "ms-vscode.cmake-tools", 14 | "compileCommands": "${workspaceFolder}/build/compile_commands.json" 15 | } 16 | ], 17 | "version": 4 18 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "iostream": "cpp", 4 | "functional": "cpp", 5 | "string": "cpp" 6 | } 7 | } -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(rpc) 3 | 4 | # 设置编译选项 5 | set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -g) 6 | 7 | # 设置可执行文件输出路径 8 | set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) 9 | 10 | # 设置项目库文件输出路径 11 | set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) 12 | 13 | # 配置可执行文件搜索路径 14 | include_directories(${PROJECT_SOURCE_DIR}/src/include) 15 | include_directories(${PROJECT_SOURCE_DIR}/example/include) 16 | 17 | # 设置项目库文件搜索路径 18 | link_directories(${PROJECT_SOURCE_DIR}/thirdlib) 19 | 20 | # 配置子目录 21 | add_subdirectory(src) 22 | add_subdirectory(example) -------------------------------------------------------------------------------- /autobuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | rm -rf `pwd`/build/* 6 | cd `pwd`/build && cmake .. && make 7 | cd .. 8 | cp -r `pwd`/src/include `pwd`/lib 9 | 10 | # 把头文件拷贝到 /usr/include/mymuduo so库拷贝到 /usr/lib PATH 11 | if [ ! -d /usr/include/rpc ]; then 12 | mkdir /usr/include/rpc 13 | fi 14 | 15 | cd `pwd`/src/include 16 | 17 | # 拷贝hpp文件 18 | for header in `ls *.hpp` 19 | do 20 | cp $header /usr/include/rpc 21 | done 22 | 23 | cd .. 24 | cd .. 25 | cp `pwd`/lib/librpc.a /usr/lib 26 | 27 | ldconfig -------------------------------------------------------------------------------- /bin/2021-4-15_log.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/bin/2021-4-15_log.txt -------------------------------------------------------------------------------- /bin/2021-4-16_log.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/bin/2021-4-16_log.txt -------------------------------------------------------------------------------- /bin/client: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/bin/client -------------------------------------------------------------------------------- /bin/provider: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/bin/provider -------------------------------------------------------------------------------- /bin/rpc.conf: -------------------------------------------------------------------------------- 1 | #rpc节点的ip地址 2 | rpcserver_ip = 127.0.0.1 3 | 4 | #rpc节点的port端口号 5 | rpcserver_port = 8000 6 | 7 | #zookeeper的ip地址 8 | zookeeper_ip = 127.0.0.1 9 | 10 | #zookeeper的port端口号 11 | zookeeper_port = 2181 12 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "7.5.0") 5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_C_COMPILER_WRAPPER "") 7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") 9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") 10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") 11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") 12 | 13 | set(CMAKE_C_PLATFORM_ID "Linux") 14 | set(CMAKE_C_SIMULATE_ID "") 15 | set(CMAKE_C_SIMULATE_VERSION "") 16 | 17 | 18 | 19 | set(CMAKE_AR "/usr/bin/ar") 20 | set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-7") 21 | set(CMAKE_RANLIB "/usr/bin/ranlib") 22 | set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7") 23 | set(CMAKE_LINKER "/usr/bin/ld") 24 | set(CMAKE_COMPILER_IS_GNUCC 1) 25 | set(CMAKE_C_COMPILER_LOADED 1) 26 | set(CMAKE_C_COMPILER_WORKS TRUE) 27 | set(CMAKE_C_ABI_COMPILED TRUE) 28 | set(CMAKE_COMPILER_IS_MINGW ) 29 | set(CMAKE_COMPILER_IS_CYGWIN ) 30 | if(CMAKE_COMPILER_IS_CYGWIN) 31 | set(CYGWIN 1) 32 | set(UNIX 1) 33 | endif() 34 | 35 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 36 | 37 | if(CMAKE_COMPILER_IS_MINGW) 38 | set(MINGW 1) 39 | endif() 40 | set(CMAKE_C_COMPILER_ID_RUN 1) 41 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 42 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 43 | set(CMAKE_C_LINKER_PREFERENCE 10) 44 | 45 | # Save compiler ABI information. 46 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 47 | set(CMAKE_C_COMPILER_ABI "ELF") 48 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 49 | 50 | if(CMAKE_C_SIZEOF_DATA_PTR) 51 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 52 | endif() 53 | 54 | if(CMAKE_C_COMPILER_ABI) 55 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 56 | endif() 57 | 58 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 59 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 60 | endif() 61 | 62 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 63 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 64 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 65 | endif() 66 | 67 | 68 | 69 | 70 | 71 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") 72 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 73 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 74 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "7.5.0") 5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_CXX_COMPILER_WRAPPER "") 7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") 8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") 9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") 10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") 13 | 14 | set(CMAKE_CXX_PLATFORM_ID "Linux") 15 | set(CMAKE_CXX_SIMULATE_ID "") 16 | set(CMAKE_CXX_SIMULATE_VERSION "") 17 | 18 | 19 | 20 | set(CMAKE_AR "/usr/bin/ar") 21 | set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-7") 22 | set(CMAKE_RANLIB "/usr/bin/ranlib") 23 | set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7") 24 | set(CMAKE_LINKER "/usr/bin/ld") 25 | set(CMAKE_COMPILER_IS_GNUCXX 1) 26 | set(CMAKE_CXX_COMPILER_LOADED 1) 27 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 28 | set(CMAKE_CXX_ABI_COMPILED TRUE) 29 | set(CMAKE_COMPILER_IS_MINGW ) 30 | set(CMAKE_COMPILER_IS_CYGWIN ) 31 | if(CMAKE_COMPILER_IS_CYGWIN) 32 | set(CYGWIN 1) 33 | set(UNIX 1) 34 | endif() 35 | 36 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 37 | 38 | if(CMAKE_COMPILER_IS_MINGW) 39 | set(MINGW 1) 40 | endif() 41 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 42 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 43 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) 44 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 45 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 46 | 47 | # Save compiler ABI information. 48 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 49 | set(CMAKE_CXX_COMPILER_ABI "ELF") 50 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 51 | 52 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 53 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 54 | endif() 55 | 56 | if(CMAKE_CXX_COMPILER_ABI) 57 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 58 | endif() 59 | 60 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 61 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 62 | endif() 63 | 64 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 65 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 66 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 67 | endif() 68 | 69 | 70 | 71 | 72 | 73 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") 74 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 75 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 76 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-118-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-118-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-118-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-118-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/CMakeFiles/3.10.2/CompilerIdC/a.out -------------------------------------------------------------------------------- /build/CMakeFiles/3.10.2/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /build/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/code/RPC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/code/RPC/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "../CMakeLists.txt" 11 | "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 12 | "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 13 | "CMakeFiles/3.10.2/CMakeSystem.cmake" 14 | "CMakeFiles/feature_tests.c" 15 | "CMakeFiles/feature_tests.cxx" 16 | "../example/CMakeLists.txt" 17 | "../example/callee/CMakeLists.txt" 18 | "../example/caller/CMakeLists.txt" 19 | "../example/src/CMakeLists.txt" 20 | "../src/CMakeLists.txt" 21 | "/usr/share/cmake-3.10/Modules/CMakeCCompiler.cmake.in" 22 | "/usr/share/cmake-3.10/Modules/CMakeCCompilerABI.c" 23 | "/usr/share/cmake-3.10/Modules/CMakeCInformation.cmake" 24 | "/usr/share/cmake-3.10/Modules/CMakeCXXCompiler.cmake.in" 25 | "/usr/share/cmake-3.10/Modules/CMakeCXXCompilerABI.cpp" 26 | "/usr/share/cmake-3.10/Modules/CMakeCXXInformation.cmake" 27 | "/usr/share/cmake-3.10/Modules/CMakeCommonLanguageInclude.cmake" 28 | "/usr/share/cmake-3.10/Modules/CMakeCompilerIdDetection.cmake" 29 | "/usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake" 30 | "/usr/share/cmake-3.10/Modules/CMakeDetermineCXXCompiler.cmake" 31 | "/usr/share/cmake-3.10/Modules/CMakeDetermineCompileFeatures.cmake" 32 | "/usr/share/cmake-3.10/Modules/CMakeDetermineCompiler.cmake" 33 | "/usr/share/cmake-3.10/Modules/CMakeDetermineCompilerABI.cmake" 34 | "/usr/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake" 35 | "/usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake" 36 | "/usr/share/cmake-3.10/Modules/CMakeFindBinUtils.cmake" 37 | "/usr/share/cmake-3.10/Modules/CMakeGenericSystem.cmake" 38 | "/usr/share/cmake-3.10/Modules/CMakeLanguageInformation.cmake" 39 | "/usr/share/cmake-3.10/Modules/CMakeParseImplicitLinkInfo.cmake" 40 | "/usr/share/cmake-3.10/Modules/CMakeSystem.cmake.in" 41 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInformation.cmake" 42 | "/usr/share/cmake-3.10/Modules/CMakeSystemSpecificInitialize.cmake" 43 | "/usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake" 44 | "/usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake" 45 | "/usr/share/cmake-3.10/Modules/CMakeTestCompilerCommon.cmake" 46 | "/usr/share/cmake-3.10/Modules/CMakeUnixFindMake.cmake" 47 | "/usr/share/cmake-3.10/Modules/Compiler/ADSP-DetermineCompiler.cmake" 48 | "/usr/share/cmake-3.10/Modules/Compiler/ARMCC-DetermineCompiler.cmake" 49 | "/usr/share/cmake-3.10/Modules/Compiler/AppleClang-DetermineCompiler.cmake" 50 | "/usr/share/cmake-3.10/Modules/Compiler/Borland-DetermineCompiler.cmake" 51 | "/usr/share/cmake-3.10/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" 52 | "/usr/share/cmake-3.10/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 53 | "/usr/share/cmake-3.10/Modules/Compiler/Clang-DetermineCompiler.cmake" 54 | "/usr/share/cmake-3.10/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" 55 | "/usr/share/cmake-3.10/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" 56 | "/usr/share/cmake-3.10/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" 57 | "/usr/share/cmake-3.10/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" 58 | "/usr/share/cmake-3.10/Modules/Compiler/Cray-DetermineCompiler.cmake" 59 | "/usr/share/cmake-3.10/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" 60 | "/usr/share/cmake-3.10/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" 61 | "/usr/share/cmake-3.10/Modules/Compiler/GHS-DetermineCompiler.cmake" 62 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-C-DetermineCompiler.cmake" 63 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-C-FeatureTests.cmake" 64 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-C.cmake" 65 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake" 66 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX-FeatureTests.cmake" 67 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-CXX.cmake" 68 | "/usr/share/cmake-3.10/Modules/Compiler/GNU-FindBinUtils.cmake" 69 | "/usr/share/cmake-3.10/Modules/Compiler/GNU.cmake" 70 | "/usr/share/cmake-3.10/Modules/Compiler/HP-C-DetermineCompiler.cmake" 71 | "/usr/share/cmake-3.10/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" 72 | "/usr/share/cmake-3.10/Modules/Compiler/IAR-DetermineCompiler.cmake" 73 | "/usr/share/cmake-3.10/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" 74 | "/usr/share/cmake-3.10/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" 75 | "/usr/share/cmake-3.10/Modules/Compiler/Intel-DetermineCompiler.cmake" 76 | "/usr/share/cmake-3.10/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" 77 | "/usr/share/cmake-3.10/Modules/Compiler/MSVC-DetermineCompiler.cmake" 78 | "/usr/share/cmake-3.10/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" 79 | "/usr/share/cmake-3.10/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" 80 | "/usr/share/cmake-3.10/Modules/Compiler/PGI-DetermineCompiler.cmake" 81 | "/usr/share/cmake-3.10/Modules/Compiler/PathScale-DetermineCompiler.cmake" 82 | "/usr/share/cmake-3.10/Modules/Compiler/SCO-DetermineCompiler.cmake" 83 | "/usr/share/cmake-3.10/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" 84 | "/usr/share/cmake-3.10/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" 85 | "/usr/share/cmake-3.10/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" 86 | "/usr/share/cmake-3.10/Modules/Compiler/TI-DetermineCompiler.cmake" 87 | "/usr/share/cmake-3.10/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" 88 | "/usr/share/cmake-3.10/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" 89 | "/usr/share/cmake-3.10/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" 90 | "/usr/share/cmake-3.10/Modules/Compiler/Watcom-DetermineCompiler.cmake" 91 | "/usr/share/cmake-3.10/Modules/Compiler/XL-C-DetermineCompiler.cmake" 92 | "/usr/share/cmake-3.10/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" 93 | "/usr/share/cmake-3.10/Modules/Compiler/zOS-C-DetermineCompiler.cmake" 94 | "/usr/share/cmake-3.10/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" 95 | "/usr/share/cmake-3.10/Modules/Internal/FeatureTesting.cmake" 96 | "/usr/share/cmake-3.10/Modules/Platform/Linux-Determine-CXX.cmake" 97 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-C.cmake" 98 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU-CXX.cmake" 99 | "/usr/share/cmake-3.10/Modules/Platform/Linux-GNU.cmake" 100 | "/usr/share/cmake-3.10/Modules/Platform/Linux.cmake" 101 | "/usr/share/cmake-3.10/Modules/Platform/UnixPaths.cmake" 102 | ) 103 | 104 | # The corresponding makefile is: 105 | set(CMAKE_MAKEFILE_OUTPUTS 106 | "Makefile" 107 | "CMakeFiles/cmake.check_cache" 108 | ) 109 | 110 | # Byproducts of CMake generate step: 111 | set(CMAKE_MAKEFILE_PRODUCTS 112 | "CMakeFiles/3.10.2/CMakeSystem.cmake" 113 | "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 114 | "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 115 | "CMakeFiles/3.10.2/CMakeCCompiler.cmake" 116 | "CMakeFiles/3.10.2/CMakeCXXCompiler.cmake" 117 | "CMakeFiles/CMakeDirectoryInformation.cmake" 118 | "src/CMakeFiles/CMakeDirectoryInformation.cmake" 119 | "example/CMakeFiles/CMakeDirectoryInformation.cmake" 120 | "example/src/CMakeFiles/CMakeDirectoryInformation.cmake" 121 | "example/callee/CMakeFiles/CMakeDirectoryInformation.cmake" 122 | "example/caller/CMakeFiles/CMakeDirectoryInformation.cmake" 123 | ) 124 | 125 | # Dependency information for all targets: 126 | set(CMAKE_DEPEND_INFO_FILES 127 | "src/CMakeFiles/rpc.dir/DependInfo.cmake" 128 | "example/callee/CMakeFiles/provider.dir/DependInfo.cmake" 129 | "example/caller/CMakeFiles/client.dir/DependInfo.cmake" 130 | ) 131 | -------------------------------------------------------------------------------- /build/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # The main recursive all target 10 | all: 11 | 12 | .PHONY : all 13 | 14 | # The main recursive preinstall target 15 | preinstall: 16 | 17 | .PHONY : preinstall 18 | 19 | #============================================================================= 20 | # Special targets provided by cmake. 21 | 22 | # Disable implicit rules so canonical targets will work. 23 | .SUFFIXES: 24 | 25 | 26 | # Remove some rules from gmake that .SUFFIXES does not remove. 27 | SUFFIXES = 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | 32 | # Suppress display of executed commands. 33 | $(VERBOSE).SILENT: 34 | 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /usr/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /usr/bin/cmake -E remove -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 61 | 62 | #============================================================================= 63 | # Directory level rules for directory src 64 | 65 | # Convenience name for "all" pass in the directory. 66 | src/all: src/CMakeFiles/rpc.dir/all 67 | 68 | .PHONY : src/all 69 | 70 | # Convenience name for "clean" pass in the directory. 71 | src/clean: src/CMakeFiles/rpc.dir/clean 72 | 73 | .PHONY : src/clean 74 | 75 | # Convenience name for "preinstall" pass in the directory. 76 | src/preinstall: 77 | 78 | .PHONY : src/preinstall 79 | 80 | #============================================================================= 81 | # Target rules for target src/CMakeFiles/rpc.dir 82 | 83 | # All Build rule for target. 84 | src/CMakeFiles/rpc.dir/all: 85 | $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/depend 86 | $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/build 87 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=7,8,9,10,11,12,13,14,15 "Built target rpc" 88 | .PHONY : src/CMakeFiles/rpc.dir/all 89 | 90 | # Include target in all. 91 | all: src/CMakeFiles/rpc.dir/all 92 | 93 | .PHONY : all 94 | 95 | # Build rule for subdir invocation for target. 96 | src/CMakeFiles/rpc.dir/rule: cmake_check_build_system 97 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 9 98 | $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/rpc.dir/all 99 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 100 | .PHONY : src/CMakeFiles/rpc.dir/rule 101 | 102 | # Convenience name for target. 103 | rpc: src/CMakeFiles/rpc.dir/rule 104 | 105 | .PHONY : rpc 106 | 107 | # clean rule for target. 108 | src/CMakeFiles/rpc.dir/clean: 109 | $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/clean 110 | .PHONY : src/CMakeFiles/rpc.dir/clean 111 | 112 | # clean rule for target. 113 | clean: src/CMakeFiles/rpc.dir/clean 114 | 115 | .PHONY : clean 116 | 117 | #============================================================================= 118 | # Directory level rules for directory example 119 | 120 | # Convenience name for "all" pass in the directory. 121 | example/all: example/src/all 122 | example/all: example/callee/all 123 | example/all: example/caller/all 124 | 125 | .PHONY : example/all 126 | 127 | # Convenience name for "clean" pass in the directory. 128 | example/clean: example/src/clean 129 | example/clean: example/callee/clean 130 | example/clean: example/caller/clean 131 | 132 | .PHONY : example/clean 133 | 134 | # Convenience name for "preinstall" pass in the directory. 135 | example/preinstall: example/src/preinstall 136 | example/preinstall: example/callee/preinstall 137 | example/preinstall: example/caller/preinstall 138 | 139 | .PHONY : example/preinstall 140 | 141 | #============================================================================= 142 | # Directory level rules for directory example/src 143 | 144 | # Convenience name for "all" pass in the directory. 145 | example/src/all: 146 | 147 | .PHONY : example/src/all 148 | 149 | # Convenience name for "clean" pass in the directory. 150 | example/src/clean: 151 | 152 | .PHONY : example/src/clean 153 | 154 | # Convenience name for "preinstall" pass in the directory. 155 | example/src/preinstall: 156 | 157 | .PHONY : example/src/preinstall 158 | 159 | #============================================================================= 160 | # Directory level rules for directory example/callee 161 | 162 | # Convenience name for "all" pass in the directory. 163 | example/callee/all: example/callee/CMakeFiles/provider.dir/all 164 | 165 | .PHONY : example/callee/all 166 | 167 | # Convenience name for "clean" pass in the directory. 168 | example/callee/clean: example/callee/CMakeFiles/provider.dir/clean 169 | 170 | .PHONY : example/callee/clean 171 | 172 | # Convenience name for "preinstall" pass in the directory. 173 | example/callee/preinstall: 174 | 175 | .PHONY : example/callee/preinstall 176 | 177 | #============================================================================= 178 | # Target rules for target example/callee/CMakeFiles/provider.dir 179 | 180 | # All Build rule for target. 181 | example/callee/CMakeFiles/provider.dir/all: src/CMakeFiles/rpc.dir/all 182 | $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/depend 183 | $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/build 184 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=4,5,6 "Built target provider" 185 | .PHONY : example/callee/CMakeFiles/provider.dir/all 186 | 187 | # Include target in all. 188 | all: example/callee/CMakeFiles/provider.dir/all 189 | 190 | .PHONY : all 191 | 192 | # Build rule for subdir invocation for target. 193 | example/callee/CMakeFiles/provider.dir/rule: cmake_check_build_system 194 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 12 195 | $(MAKE) -f CMakeFiles/Makefile2 example/callee/CMakeFiles/provider.dir/all 196 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 197 | .PHONY : example/callee/CMakeFiles/provider.dir/rule 198 | 199 | # Convenience name for target. 200 | provider: example/callee/CMakeFiles/provider.dir/rule 201 | 202 | .PHONY : provider 203 | 204 | # clean rule for target. 205 | example/callee/CMakeFiles/provider.dir/clean: 206 | $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/clean 207 | .PHONY : example/callee/CMakeFiles/provider.dir/clean 208 | 209 | # clean rule for target. 210 | clean: example/callee/CMakeFiles/provider.dir/clean 211 | 212 | .PHONY : clean 213 | 214 | #============================================================================= 215 | # Directory level rules for directory example/caller 216 | 217 | # Convenience name for "all" pass in the directory. 218 | example/caller/all: example/caller/CMakeFiles/client.dir/all 219 | 220 | .PHONY : example/caller/all 221 | 222 | # Convenience name for "clean" pass in the directory. 223 | example/caller/clean: example/caller/CMakeFiles/client.dir/clean 224 | 225 | .PHONY : example/caller/clean 226 | 227 | # Convenience name for "preinstall" pass in the directory. 228 | example/caller/preinstall: 229 | 230 | .PHONY : example/caller/preinstall 231 | 232 | #============================================================================= 233 | # Target rules for target example/caller/CMakeFiles/client.dir 234 | 235 | # All Build rule for target. 236 | example/caller/CMakeFiles/client.dir/all: src/CMakeFiles/rpc.dir/all 237 | $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/depend 238 | $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/build 239 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=1,2,3 "Built target client" 240 | .PHONY : example/caller/CMakeFiles/client.dir/all 241 | 242 | # Include target in all. 243 | all: example/caller/CMakeFiles/client.dir/all 244 | 245 | .PHONY : all 246 | 247 | # Build rule for subdir invocation for target. 248 | example/caller/CMakeFiles/client.dir/rule: cmake_check_build_system 249 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 12 250 | $(MAKE) -f CMakeFiles/Makefile2 example/caller/CMakeFiles/client.dir/all 251 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 252 | .PHONY : example/caller/CMakeFiles/client.dir/rule 253 | 254 | # Convenience name for target. 255 | client: example/caller/CMakeFiles/client.dir/rule 256 | 257 | .PHONY : client 258 | 259 | # clean rule for target. 260 | example/caller/CMakeFiles/client.dir/clean: 261 | $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/clean 262 | .PHONY : example/caller/CMakeFiles/client.dir/clean 263 | 264 | # clean rule for target. 265 | clean: example/caller/CMakeFiles/client.dir/clean 266 | 267 | .PHONY : clean 268 | 269 | #============================================================================= 270 | # Special targets to cleanup operation of make. 271 | 272 | # Special rule to run CMake to check the build system integrity. 273 | # No rule that depends on this can have commands that come from listfiles 274 | # because they might be regenerated. 275 | cmake_check_build_system: 276 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 277 | .PHONY : cmake_check_build_system 278 | 279 | -------------------------------------------------------------------------------- /build/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/ubuntu/code/RPC/build/CMakeFiles/rebuild_cache.dir 2 | /home/ubuntu/code/RPC/build/CMakeFiles/edit_cache.dir 3 | /home/ubuntu/code/RPC/build/src/CMakeFiles/rebuild_cache.dir 4 | /home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir 5 | /home/ubuntu/code/RPC/build/src/CMakeFiles/edit_cache.dir 6 | /home/ubuntu/code/RPC/build/example/CMakeFiles/rebuild_cache.dir 7 | /home/ubuntu/code/RPC/build/example/CMakeFiles/edit_cache.dir 8 | /home/ubuntu/code/RPC/build/example/src/CMakeFiles/rebuild_cache.dir 9 | /home/ubuntu/code/RPC/build/example/src/CMakeFiles/edit_cache.dir 10 | /home/ubuntu/code/RPC/build/example/callee/CMakeFiles/rebuild_cache.dir 11 | /home/ubuntu/code/RPC/build/example/callee/CMakeFiles/provider.dir 12 | /home/ubuntu/code/RPC/build/example/callee/CMakeFiles/edit_cache.dir 13 | /home/ubuntu/code/RPC/build/example/caller/CMakeFiles/rebuild_cache.dir 14 | /home/ubuntu/code/RPC/build/example/caller/CMakeFiles/client.dir 15 | /home/ubuntu/code/RPC/build/example/caller/CMakeFiles/edit_cache.dir 16 | -------------------------------------------------------------------------------- /build/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /build/CMakeFiles/feature_tests.cxx: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "CXX_FEATURE:" 4 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "cxx_aggregate_default_initializers\n" 10 | "CXX_FEATURE:" 11 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "cxx_alias_templates\n" 17 | "CXX_FEATURE:" 18 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "cxx_alignas\n" 24 | "CXX_FEATURE:" 25 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "cxx_alignof\n" 31 | "CXX_FEATURE:" 32 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 33 | "1" 34 | #else 35 | "0" 36 | #endif 37 | "cxx_attributes\n" 38 | "CXX_FEATURE:" 39 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 40 | "1" 41 | #else 42 | "0" 43 | #endif 44 | "cxx_attribute_deprecated\n" 45 | "CXX_FEATURE:" 46 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 47 | "1" 48 | #else 49 | "0" 50 | #endif 51 | "cxx_auto_type\n" 52 | "CXX_FEATURE:" 53 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 54 | "1" 55 | #else 56 | "0" 57 | #endif 58 | "cxx_binary_literals\n" 59 | "CXX_FEATURE:" 60 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 61 | "1" 62 | #else 63 | "0" 64 | #endif 65 | "cxx_constexpr\n" 66 | "CXX_FEATURE:" 67 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 68 | "1" 69 | #else 70 | "0" 71 | #endif 72 | "cxx_contextual_conversions\n" 73 | "CXX_FEATURE:" 74 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 75 | "1" 76 | #else 77 | "0" 78 | #endif 79 | "cxx_decltype\n" 80 | "CXX_FEATURE:" 81 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 82 | "1" 83 | #else 84 | "0" 85 | #endif 86 | "cxx_decltype_auto\n" 87 | "CXX_FEATURE:" 88 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 89 | "1" 90 | #else 91 | "0" 92 | #endif 93 | "cxx_decltype_incomplete_return_types\n" 94 | "CXX_FEATURE:" 95 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 96 | "1" 97 | #else 98 | "0" 99 | #endif 100 | "cxx_default_function_template_args\n" 101 | "CXX_FEATURE:" 102 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 103 | "1" 104 | #else 105 | "0" 106 | #endif 107 | "cxx_defaulted_functions\n" 108 | "CXX_FEATURE:" 109 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 110 | "1" 111 | #else 112 | "0" 113 | #endif 114 | "cxx_defaulted_move_initializers\n" 115 | "CXX_FEATURE:" 116 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 117 | "1" 118 | #else 119 | "0" 120 | #endif 121 | "cxx_delegating_constructors\n" 122 | "CXX_FEATURE:" 123 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 124 | "1" 125 | #else 126 | "0" 127 | #endif 128 | "cxx_deleted_functions\n" 129 | "CXX_FEATURE:" 130 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 131 | "1" 132 | #else 133 | "0" 134 | #endif 135 | "cxx_digit_separators\n" 136 | "CXX_FEATURE:" 137 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 138 | "1" 139 | #else 140 | "0" 141 | #endif 142 | "cxx_enum_forward_declarations\n" 143 | "CXX_FEATURE:" 144 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 145 | "1" 146 | #else 147 | "0" 148 | #endif 149 | "cxx_explicit_conversions\n" 150 | "CXX_FEATURE:" 151 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 152 | "1" 153 | #else 154 | "0" 155 | #endif 156 | "cxx_extended_friend_declarations\n" 157 | "CXX_FEATURE:" 158 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 159 | "1" 160 | #else 161 | "0" 162 | #endif 163 | "cxx_extern_templates\n" 164 | "CXX_FEATURE:" 165 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 166 | "1" 167 | #else 168 | "0" 169 | #endif 170 | "cxx_final\n" 171 | "CXX_FEATURE:" 172 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 173 | "1" 174 | #else 175 | "0" 176 | #endif 177 | "cxx_func_identifier\n" 178 | "CXX_FEATURE:" 179 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 180 | "1" 181 | #else 182 | "0" 183 | #endif 184 | "cxx_generalized_initializers\n" 185 | "CXX_FEATURE:" 186 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 187 | "1" 188 | #else 189 | "0" 190 | #endif 191 | "cxx_generic_lambdas\n" 192 | "CXX_FEATURE:" 193 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 194 | "1" 195 | #else 196 | "0" 197 | #endif 198 | "cxx_inheriting_constructors\n" 199 | "CXX_FEATURE:" 200 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 201 | "1" 202 | #else 203 | "0" 204 | #endif 205 | "cxx_inline_namespaces\n" 206 | "CXX_FEATURE:" 207 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 208 | "1" 209 | #else 210 | "0" 211 | #endif 212 | "cxx_lambdas\n" 213 | "CXX_FEATURE:" 214 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 215 | "1" 216 | #else 217 | "0" 218 | #endif 219 | "cxx_lambda_init_captures\n" 220 | "CXX_FEATURE:" 221 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 222 | "1" 223 | #else 224 | "0" 225 | #endif 226 | "cxx_local_type_template_args\n" 227 | "CXX_FEATURE:" 228 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 229 | "1" 230 | #else 231 | "0" 232 | #endif 233 | "cxx_long_long_type\n" 234 | "CXX_FEATURE:" 235 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 236 | "1" 237 | #else 238 | "0" 239 | #endif 240 | "cxx_noexcept\n" 241 | "CXX_FEATURE:" 242 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 243 | "1" 244 | #else 245 | "0" 246 | #endif 247 | "cxx_nonstatic_member_init\n" 248 | "CXX_FEATURE:" 249 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 250 | "1" 251 | #else 252 | "0" 253 | #endif 254 | "cxx_nullptr\n" 255 | "CXX_FEATURE:" 256 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 257 | "1" 258 | #else 259 | "0" 260 | #endif 261 | "cxx_override\n" 262 | "CXX_FEATURE:" 263 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 264 | "1" 265 | #else 266 | "0" 267 | #endif 268 | "cxx_range_for\n" 269 | "CXX_FEATURE:" 270 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 271 | "1" 272 | #else 273 | "0" 274 | #endif 275 | "cxx_raw_string_literals\n" 276 | "CXX_FEATURE:" 277 | #if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L 278 | "1" 279 | #else 280 | "0" 281 | #endif 282 | "cxx_reference_qualified_functions\n" 283 | "CXX_FEATURE:" 284 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 285 | "1" 286 | #else 287 | "0" 288 | #endif 289 | "cxx_relaxed_constexpr\n" 290 | "CXX_FEATURE:" 291 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L 292 | "1" 293 | #else 294 | "0" 295 | #endif 296 | "cxx_return_type_deduction\n" 297 | "CXX_FEATURE:" 298 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 299 | "1" 300 | #else 301 | "0" 302 | #endif 303 | "cxx_right_angle_brackets\n" 304 | "CXX_FEATURE:" 305 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 306 | "1" 307 | #else 308 | "0" 309 | #endif 310 | "cxx_rvalue_references\n" 311 | "CXX_FEATURE:" 312 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 313 | "1" 314 | #else 315 | "0" 316 | #endif 317 | "cxx_sizeof_member\n" 318 | "CXX_FEATURE:" 319 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 320 | "1" 321 | #else 322 | "0" 323 | #endif 324 | "cxx_static_assert\n" 325 | "CXX_FEATURE:" 326 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 327 | "1" 328 | #else 329 | "0" 330 | #endif 331 | "cxx_strong_enums\n" 332 | "CXX_FEATURE:" 333 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus 334 | "1" 335 | #else 336 | "0" 337 | #endif 338 | "cxx_template_template_parameters\n" 339 | "CXX_FEATURE:" 340 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L 341 | "1" 342 | #else 343 | "0" 344 | #endif 345 | "cxx_thread_local\n" 346 | "CXX_FEATURE:" 347 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 348 | "1" 349 | #else 350 | "0" 351 | #endif 352 | "cxx_trailing_return_types\n" 353 | "CXX_FEATURE:" 354 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 355 | "1" 356 | #else 357 | "0" 358 | #endif 359 | "cxx_unicode_literals\n" 360 | "CXX_FEATURE:" 361 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 362 | "1" 363 | #else 364 | "0" 365 | #endif 366 | "cxx_uniform_initialization\n" 367 | "CXX_FEATURE:" 368 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 369 | "1" 370 | #else 371 | "0" 372 | #endif 373 | "cxx_unrestricted_unions\n" 374 | "CXX_FEATURE:" 375 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L 376 | "1" 377 | #else 378 | "0" 379 | #endif 380 | "cxx_user_literals\n" 381 | "CXX_FEATURE:" 382 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L 383 | "1" 384 | #else 385 | "0" 386 | #endif 387 | "cxx_variable_templates\n" 388 | "CXX_FEATURE:" 389 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 390 | "1" 391 | #else 392 | "0" 393 | #endif 394 | "cxx_variadic_macros\n" 395 | "CXX_FEATURE:" 396 | #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) 397 | "1" 398 | #else 399 | "0" 400 | #endif 401 | "cxx_variadic_templates\n" 402 | 403 | }; 404 | 405 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 406 | -------------------------------------------------------------------------------- /build/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 15 2 | -------------------------------------------------------------------------------- /build/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles /home/ubuntu/code/RPC/build/CMakeFiles/progress.marks 84 | $(MAKE) -f CMakeFiles/Makefile2 all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | $(MAKE) -f CMakeFiles/Makefile2 clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | $(MAKE) -f CMakeFiles/Makefile2 preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | #============================================================================= 114 | # Target rules for targets named rpc 115 | 116 | # Build rule for target. 117 | rpc: cmake_check_build_system 118 | $(MAKE) -f CMakeFiles/Makefile2 rpc 119 | .PHONY : rpc 120 | 121 | # fast build rule for target. 122 | rpc/fast: 123 | $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/build 124 | .PHONY : rpc/fast 125 | 126 | #============================================================================= 127 | # Target rules for targets named provider 128 | 129 | # Build rule for target. 130 | provider: cmake_check_build_system 131 | $(MAKE) -f CMakeFiles/Makefile2 provider 132 | .PHONY : provider 133 | 134 | # fast build rule for target. 135 | provider/fast: 136 | $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/build 137 | .PHONY : provider/fast 138 | 139 | #============================================================================= 140 | # Target rules for targets named client 141 | 142 | # Build rule for target. 143 | client: cmake_check_build_system 144 | $(MAKE) -f CMakeFiles/Makefile2 client 145 | .PHONY : client 146 | 147 | # fast build rule for target. 148 | client/fast: 149 | $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/build 150 | .PHONY : client/fast 151 | 152 | # Help Target 153 | help: 154 | @echo "The following are some of the valid targets for this Makefile:" 155 | @echo "... all (the default if no target is provided)" 156 | @echo "... clean" 157 | @echo "... depend" 158 | @echo "... rebuild_cache" 159 | @echo "... edit_cache" 160 | @echo "... rpc" 161 | @echo "... provider" 162 | @echo "... client" 163 | .PHONY : help 164 | 165 | 166 | 167 | #============================================================================= 168 | # Special targets to cleanup operation of make. 169 | 170 | # Special rule to run CMake to check the build system integrity. 171 | # No rule that depends on this can have commands that come from listfiles 172 | # because they might be regenerated. 173 | cmake_check_build_system: 174 | $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 175 | .PHONY : cmake_check_build_system 176 | 177 | -------------------------------------------------------------------------------- /build/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/code/RPC 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | if(NOT CMAKE_INSTALL_LOCAL_ONLY) 41 | # Include the install script for each subdirectory. 42 | include("/home/ubuntu/code/RPC/build/src/cmake_install.cmake") 43 | include("/home/ubuntu/code/RPC/build/example/cmake_install.cmake") 44 | 45 | endif() 46 | 47 | if(CMAKE_INSTALL_COMPONENT) 48 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 49 | else() 50 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 51 | endif() 52 | 53 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 54 | "${CMAKE_INSTALL_MANIFEST_FILES}") 55 | file(WRITE "/home/ubuntu/code/RPC/build/${CMAKE_INSTALL_MANIFEST}" 56 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 57 | -------------------------------------------------------------------------------- /build/example/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/code/RPC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/code/RPC/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/example/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 15 2 | -------------------------------------------------------------------------------- /build/example/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles /home/ubuntu/code/RPC/build/example/CMakeFiles/progress.marks 84 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Help Target 114 | help: 115 | @echo "The following are some of the valid targets for this Makefile:" 116 | @echo "... all (the default if no target is provided)" 117 | @echo "... clean" 118 | @echo "... depend" 119 | @echo "... rebuild_cache" 120 | @echo "... edit_cache" 121 | .PHONY : help 122 | 123 | 124 | 125 | #============================================================================= 126 | # Special targets to cleanup operation of make. 127 | 128 | # Special rule to run CMake to check the build system integrity. 129 | # No rule that depends on this can have commands that come from listfiles 130 | # because they might be regenerated. 131 | cmake_check_build_system: 132 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 133 | .PHONY : cmake_check_build_system 134 | 135 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/code/RPC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/code/RPC/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | ../example/include/User.pb.h 10 | string 11 | - 12 | google/protobuf/stubs/common.h 13 | - 14 | google/protobuf/arena.h 15 | - 16 | google/protobuf/arenastring.h 17 | - 18 | google/protobuf/generated_message_util.h 19 | - 20 | google/protobuf/metadata.h 21 | - 22 | google/protobuf/message.h 23 | - 24 | google/protobuf/repeated_field.h 25 | - 26 | google/protobuf/extension_set.h 27 | - 28 | google/protobuf/service.h 29 | - 30 | google/protobuf/unknown_field_set.h 31 | - 32 | 33 | ../src/include/LoggerQueue.hpp 34 | queue 35 | - 36 | mutex 37 | - 38 | thread 39 | - 40 | condition_variable 41 | - 42 | 43 | ../src/include/RpcApplication.hpp 44 | RpcConfigure.hpp 45 | ../src/include/RpcConfigure.hpp 46 | 47 | ../src/include/RpcConfigure.hpp 48 | unordered_map 49 | - 50 | string 51 | - 52 | 53 | ../src/include/RpcLogger.hpp 54 | LoggerQueue.hpp 55 | ../src/include/LoggerQueue.hpp 56 | string 57 | - 58 | time.h 59 | - 60 | 61 | ../src/include/RpcProvider.hpp 62 | google/protobuf/service.h 63 | - 64 | google/protobuf/descriptor.h 65 | - 66 | muduo/net/TcpServer.h 67 | - 68 | muduo/net/EventLoop.h 69 | - 70 | muduo/net/InetAddress.h 71 | - 72 | muduo/net/TcpConnection.h 73 | - 74 | muduo/net/Buffer.h 75 | - 76 | unordered_map 77 | - 78 | string 79 | - 80 | iostream 81 | - 82 | functional 83 | - 84 | 85 | /home/ubuntu/code/RPC/example/callee/UserService.cpp 86 | iostream 87 | - 88 | string 89 | - 90 | User.pb.h 91 | /home/ubuntu/code/RPC/example/callee/User.pb.h 92 | RpcApplication.hpp 93 | /home/ubuntu/code/RPC/example/callee/RpcApplication.hpp 94 | RpcProvider.hpp 95 | /home/ubuntu/code/RPC/example/callee/RpcProvider.hpp 96 | RpcLogger.hpp 97 | /home/ubuntu/code/RPC/example/callee/RpcLogger.hpp 98 | 99 | /home/ubuntu/code/RPC/example/src/User.pb.cc 100 | User.pb.h 101 | /home/ubuntu/code/RPC/example/src/User.pb.h 102 | algorithm 103 | - 104 | google/protobuf/stubs/common.h 105 | - 106 | google/protobuf/stubs/port.h 107 | - 108 | google/protobuf/stubs/once.h 109 | - 110 | google/protobuf/io/coded_stream.h 111 | - 112 | google/protobuf/wire_format_lite_inl.h 113 | - 114 | google/protobuf/descriptor.h 115 | - 116 | google/protobuf/generated_message_reflection.h 117 | - 118 | google/protobuf/reflection_ops.h 119 | - 120 | google/protobuf/wire_format.h 121 | - 122 | 123 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/ubuntu/code/RPC/example/callee/UserService.cpp" "/home/ubuntu/code/RPC/build/example/callee/CMakeFiles/provider.dir/UserService.cpp.o" 8 | "/home/ubuntu/code/RPC/example/src/User.pb.cc" "/home/ubuntu/code/RPC/build/example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o" 9 | ) 10 | set(CMAKE_CXX_COMPILER_ID "GNU") 11 | 12 | # The include file search paths: 13 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 14 | "../src/include" 15 | "../example/include" 16 | ) 17 | 18 | # Targets to which this target links. 19 | set(CMAKE_TARGET_LINKED_INFO_FILES 20 | "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/DependInfo.cmake" 21 | ) 22 | 23 | # Fortran module output directory. 24 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 25 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/UserService.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/example/callee/CMakeFiles/provider.dir/UserService.cpp.o -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 50 | 51 | # Include any dependencies generated for this target. 52 | include example/callee/CMakeFiles/provider.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include example/callee/CMakeFiles/provider.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include example/callee/CMakeFiles/provider.dir/flags.make 59 | 60 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: example/callee/CMakeFiles/provider.dir/flags.make 61 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../example/callee/UserService.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object example/callee/CMakeFiles/provider.dir/UserService.cpp.o" 63 | cd /home/ubuntu/code/RPC/build/example/callee && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/provider.dir/UserService.cpp.o -c /home/ubuntu/code/RPC/example/callee/UserService.cpp 64 | 65 | example/callee/CMakeFiles/provider.dir/UserService.cpp.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/provider.dir/UserService.cpp.i" 67 | cd /home/ubuntu/code/RPC/build/example/callee && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/code/RPC/example/callee/UserService.cpp > CMakeFiles/provider.dir/UserService.cpp.i 68 | 69 | example/callee/CMakeFiles/provider.dir/UserService.cpp.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/provider.dir/UserService.cpp.s" 71 | cd /home/ubuntu/code/RPC/build/example/callee && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/code/RPC/example/callee/UserService.cpp -o CMakeFiles/provider.dir/UserService.cpp.s 72 | 73 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o.requires: 74 | 75 | .PHONY : example/callee/CMakeFiles/provider.dir/UserService.cpp.o.requires 76 | 77 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o.provides: example/callee/CMakeFiles/provider.dir/UserService.cpp.o.requires 78 | $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/UserService.cpp.o.provides.build 79 | .PHONY : example/callee/CMakeFiles/provider.dir/UserService.cpp.o.provides 80 | 81 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o.provides.build: example/callee/CMakeFiles/provider.dir/UserService.cpp.o 82 | 83 | 84 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o: example/callee/CMakeFiles/provider.dir/flags.make 85 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o: ../example/src/User.pb.cc 86 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o" 87 | cd /home/ubuntu/code/RPC/build/example/callee && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/provider.dir/__/src/User.pb.cc.o -c /home/ubuntu/code/RPC/example/src/User.pb.cc 88 | 89 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.i: cmake_force 90 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/provider.dir/__/src/User.pb.cc.i" 91 | cd /home/ubuntu/code/RPC/build/example/callee && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/code/RPC/example/src/User.pb.cc > CMakeFiles/provider.dir/__/src/User.pb.cc.i 92 | 93 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.s: cmake_force 94 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/provider.dir/__/src/User.pb.cc.s" 95 | cd /home/ubuntu/code/RPC/build/example/callee && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/code/RPC/example/src/User.pb.cc -o CMakeFiles/provider.dir/__/src/User.pb.cc.s 96 | 97 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.requires: 98 | 99 | .PHONY : example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.requires 100 | 101 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.provides: example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.requires 102 | $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.provides.build 103 | .PHONY : example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.provides 104 | 105 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.provides.build: example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o 106 | 107 | 108 | # Object files for target provider 109 | provider_OBJECTS = \ 110 | "CMakeFiles/provider.dir/UserService.cpp.o" \ 111 | "CMakeFiles/provider.dir/__/src/User.pb.cc.o" 112 | 113 | # External object files for target provider 114 | provider_EXTERNAL_OBJECTS = 115 | 116 | ../bin/provider: example/callee/CMakeFiles/provider.dir/UserService.cpp.o 117 | ../bin/provider: example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o 118 | ../bin/provider: example/callee/CMakeFiles/provider.dir/build.make 119 | ../bin/provider: ../lib/librpc.a 120 | ../bin/provider: example/callee/CMakeFiles/provider.dir/link.txt 121 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking CXX executable ../../../bin/provider" 122 | cd /home/ubuntu/code/RPC/build/example/callee && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/provider.dir/link.txt --verbose=$(VERBOSE) 123 | 124 | # Rule to build all files generated by this target. 125 | example/callee/CMakeFiles/provider.dir/build: ../bin/provider 126 | 127 | .PHONY : example/callee/CMakeFiles/provider.dir/build 128 | 129 | example/callee/CMakeFiles/provider.dir/requires: example/callee/CMakeFiles/provider.dir/UserService.cpp.o.requires 130 | example/callee/CMakeFiles/provider.dir/requires: example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o.requires 131 | 132 | .PHONY : example/callee/CMakeFiles/provider.dir/requires 133 | 134 | example/callee/CMakeFiles/provider.dir/clean: 135 | cd /home/ubuntu/code/RPC/build/example/callee && $(CMAKE_COMMAND) -P CMakeFiles/provider.dir/cmake_clean.cmake 136 | .PHONY : example/callee/CMakeFiles/provider.dir/clean 137 | 138 | example/callee/CMakeFiles/provider.dir/depend: 139 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/ubuntu/code/RPC /home/ubuntu/code/RPC/example/callee /home/ubuntu/code/RPC/build /home/ubuntu/code/RPC/build/example/callee /home/ubuntu/code/RPC/build/example/callee/CMakeFiles/provider.dir/DependInfo.cmake --color=$(COLOR) 140 | .PHONY : example/callee/CMakeFiles/provider.dir/depend 141 | 142 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/provider.dir/UserService.cpp.o" 3 | "CMakeFiles/provider.dir/__/src/User.pb.cc.o" 4 | "../../../bin/provider.pdb" 5 | "../../../bin/provider" 6 | ) 7 | 8 | # Per-language clean rules from dependency scanning. 9 | foreach(lang CXX) 10 | include(CMakeFiles/provider.dir/cmake_clean_${lang}.cmake OPTIONAL) 11 | endforeach() 12 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o 5 | ../example/include/User.pb.h 6 | ../src/include/LoggerQueue.hpp 7 | ../src/include/RpcApplication.hpp 8 | ../src/include/RpcConfigure.hpp 9 | ../src/include/RpcLogger.hpp 10 | ../src/include/RpcProvider.hpp 11 | /home/ubuntu/code/RPC/example/callee/UserService.cpp 12 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o 13 | ../example/include/User.pb.h 14 | /home/ubuntu/code/RPC/example/src/User.pb.cc 15 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../example/include/User.pb.h 5 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../src/include/LoggerQueue.hpp 6 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../src/include/RpcApplication.hpp 7 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../src/include/RpcConfigure.hpp 8 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../src/include/RpcLogger.hpp 9 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../src/include/RpcProvider.hpp 10 | example/callee/CMakeFiles/provider.dir/UserService.cpp.o: ../example/callee/UserService.cpp 11 | 12 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o: ../example/include/User.pb.h 13 | example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o: ../example/src/User.pb.cc 14 | 15 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -g 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/home/ubuntu/code/RPC/src/include -I/home/ubuntu/code/RPC/example/include 10 | 11 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -g -rdynamic CMakeFiles/provider.dir/UserService.cpp.o CMakeFiles/provider.dir/__/src/User.pb.cc.o -o ../../../bin/provider -L/home/ubuntu/code/RPC/thirdlib -Wl,-rpath,/home/ubuntu/code/RPC/thirdlib ../../../lib/librpc.a -lprotobuf -lmuduo_base -lpthread -lzookeeper_mt -lmuduo_net -lzookeeper_mt 2 | -------------------------------------------------------------------------------- /build/example/callee/CMakeFiles/provider.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 4 2 | CMAKE_PROGRESS_2 = 5 3 | CMAKE_PROGRESS_3 = 6 4 | 5 | -------------------------------------------------------------------------------- /build/example/callee/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles /home/ubuntu/code/RPC/build/example/callee/CMakeFiles/progress.marks 84 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Convenience name for target. 114 | example/callee/CMakeFiles/provider.dir/rule: 115 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/callee/CMakeFiles/provider.dir/rule 116 | .PHONY : example/callee/CMakeFiles/provider.dir/rule 117 | 118 | # Convenience name for target. 119 | provider: example/callee/CMakeFiles/provider.dir/rule 120 | 121 | .PHONY : provider 122 | 123 | # fast build rule for target. 124 | provider/fast: 125 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/build 126 | .PHONY : provider/fast 127 | 128 | UserService.o: UserService.cpp.o 129 | 130 | .PHONY : UserService.o 131 | 132 | # target to build an object file 133 | UserService.cpp.o: 134 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/UserService.cpp.o 135 | .PHONY : UserService.cpp.o 136 | 137 | UserService.i: UserService.cpp.i 138 | 139 | .PHONY : UserService.i 140 | 141 | # target to preprocess a source file 142 | UserService.cpp.i: 143 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/UserService.cpp.i 144 | .PHONY : UserService.cpp.i 145 | 146 | UserService.s: UserService.cpp.s 147 | 148 | .PHONY : UserService.s 149 | 150 | # target to generate assembly for a file 151 | UserService.cpp.s: 152 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/UserService.cpp.s 153 | .PHONY : UserService.cpp.s 154 | 155 | __/src/User.pb.o: __/src/User.pb.cc.o 156 | 157 | .PHONY : __/src/User.pb.o 158 | 159 | # target to build an object file 160 | __/src/User.pb.cc.o: 161 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.o 162 | .PHONY : __/src/User.pb.cc.o 163 | 164 | __/src/User.pb.i: __/src/User.pb.cc.i 165 | 166 | .PHONY : __/src/User.pb.i 167 | 168 | # target to preprocess a source file 169 | __/src/User.pb.cc.i: 170 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.i 171 | .PHONY : __/src/User.pb.cc.i 172 | 173 | __/src/User.pb.s: __/src/User.pb.cc.s 174 | 175 | .PHONY : __/src/User.pb.s 176 | 177 | # target to generate assembly for a file 178 | __/src/User.pb.cc.s: 179 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/callee/CMakeFiles/provider.dir/build.make example/callee/CMakeFiles/provider.dir/__/src/User.pb.cc.s 180 | .PHONY : __/src/User.pb.cc.s 181 | 182 | # Help Target 183 | help: 184 | @echo "The following are some of the valid targets for this Makefile:" 185 | @echo "... all (the default if no target is provided)" 186 | @echo "... clean" 187 | @echo "... depend" 188 | @echo "... rebuild_cache" 189 | @echo "... provider" 190 | @echo "... edit_cache" 191 | @echo "... UserService.o" 192 | @echo "... UserService.i" 193 | @echo "... UserService.s" 194 | @echo "... __/src/User.pb.o" 195 | @echo "... __/src/User.pb.i" 196 | @echo "... __/src/User.pb.s" 197 | .PHONY : help 198 | 199 | 200 | 201 | #============================================================================= 202 | # Special targets to cleanup operation of make. 203 | 204 | # Special rule to run CMake to check the build system integrity. 205 | # No rule that depends on this can have commands that come from listfiles 206 | # because they might be regenerated. 207 | cmake_check_build_system: 208 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 209 | .PHONY : cmake_check_build_system 210 | 211 | -------------------------------------------------------------------------------- /build/example/callee/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/code/RPC/example/callee 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/code/RPC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/code/RPC/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | ../example/include/User.pb.h 10 | string 11 | - 12 | google/protobuf/stubs/common.h 13 | - 14 | google/protobuf/arena.h 15 | - 16 | google/protobuf/arenastring.h 17 | - 18 | google/protobuf/generated_message_util.h 19 | - 20 | google/protobuf/metadata.h 21 | - 22 | google/protobuf/message.h 23 | - 24 | google/protobuf/repeated_field.h 25 | - 26 | google/protobuf/extension_set.h 27 | - 28 | google/protobuf/service.h 29 | - 30 | google/protobuf/unknown_field_set.h 31 | - 32 | 33 | ../src/include/RpcApplication.hpp 34 | RpcConfigure.hpp 35 | ../src/include/RpcConfigure.hpp 36 | 37 | ../src/include/RpcChannel.hpp 38 | google/protobuf/service.h 39 | - 40 | google/protobuf/descriptor.h 41 | - 42 | google/protobuf/message.h 43 | - 44 | string 45 | - 46 | iostream 47 | - 48 | 49 | ../src/include/RpcConfigure.hpp 50 | unordered_map 51 | - 52 | string 53 | - 54 | 55 | ../src/include/RpcControl.hpp 56 | google/protobuf/service.h 57 | - 58 | string 59 | - 60 | 61 | /home/ubuntu/code/RPC/example/caller/CallUserService.cpp 62 | iostream 63 | - 64 | RpcApplication.hpp 65 | /home/ubuntu/code/RPC/example/caller/RpcApplication.hpp 66 | RpcControl.hpp 67 | /home/ubuntu/code/RPC/example/caller/RpcControl.hpp 68 | User.pb.h 69 | /home/ubuntu/code/RPC/example/caller/User.pb.h 70 | RpcChannel.hpp 71 | /home/ubuntu/code/RPC/example/caller/RpcChannel.hpp 72 | 73 | /home/ubuntu/code/RPC/example/src/User.pb.cc 74 | User.pb.h 75 | /home/ubuntu/code/RPC/example/src/User.pb.h 76 | algorithm 77 | - 78 | google/protobuf/stubs/common.h 79 | - 80 | google/protobuf/stubs/port.h 81 | - 82 | google/protobuf/stubs/once.h 83 | - 84 | google/protobuf/io/coded_stream.h 85 | - 86 | google/protobuf/wire_format_lite_inl.h 87 | - 88 | google/protobuf/descriptor.h 89 | - 90 | google/protobuf/generated_message_reflection.h 91 | - 92 | google/protobuf/reflection_ops.h 93 | - 94 | google/protobuf/wire_format.h 95 | - 96 | 97 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/example/caller/CMakeFiles/client.dir/CallUserService.cpp.o -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/ubuntu/code/RPC/example/caller/CallUserService.cpp" "/home/ubuntu/code/RPC/build/example/caller/CMakeFiles/client.dir/CallUserService.cpp.o" 8 | "/home/ubuntu/code/RPC/example/src/User.pb.cc" "/home/ubuntu/code/RPC/build/example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o" 9 | ) 10 | set(CMAKE_CXX_COMPILER_ID "GNU") 11 | 12 | # The include file search paths: 13 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 14 | "../src/include" 15 | "../example/include" 16 | ) 17 | 18 | # Targets to which this target links. 19 | set(CMAKE_TARGET_LINKED_INFO_FILES 20 | "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/DependInfo.cmake" 21 | ) 22 | 23 | # Fortran module output directory. 24 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 25 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Remove some rules from gmake that .SUFFIXES does not remove. 16 | SUFFIXES = 17 | 18 | .SUFFIXES: .hpux_make_needs_suffix_list 19 | 20 | 21 | # Suppress display of executed commands. 22 | $(VERBOSE).SILENT: 23 | 24 | 25 | # A target that is always out of date. 26 | cmake_force: 27 | 28 | .PHONY : cmake_force 29 | 30 | #============================================================================= 31 | # Set environment variables for the build. 32 | 33 | # The shell in which to execute make rules. 34 | SHELL = /bin/sh 35 | 36 | # The CMake executable. 37 | CMAKE_COMMAND = /usr/bin/cmake 38 | 39 | # The command to remove a file. 40 | RM = /usr/bin/cmake -E remove -f 41 | 42 | # Escaping for special characters. 43 | EQUALS = = 44 | 45 | # The top-level source directory on which CMake was run. 46 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 47 | 48 | # The top-level build directory on which CMake was run. 49 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 50 | 51 | # Include any dependencies generated for this target. 52 | include example/caller/CMakeFiles/client.dir/depend.make 53 | 54 | # Include the progress variables for this target. 55 | include example/caller/CMakeFiles/client.dir/progress.make 56 | 57 | # Include the compile flags for this target's objects. 58 | include example/caller/CMakeFiles/client.dir/flags.make 59 | 60 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: example/caller/CMakeFiles/client.dir/flags.make 61 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../example/caller/CallUserService.cpp 62 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object example/caller/CMakeFiles/client.dir/CallUserService.cpp.o" 63 | cd /home/ubuntu/code/RPC/build/example/caller && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/client.dir/CallUserService.cpp.o -c /home/ubuntu/code/RPC/example/caller/CallUserService.cpp 64 | 65 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.i: cmake_force 66 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/client.dir/CallUserService.cpp.i" 67 | cd /home/ubuntu/code/RPC/build/example/caller && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/code/RPC/example/caller/CallUserService.cpp > CMakeFiles/client.dir/CallUserService.cpp.i 68 | 69 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.s: cmake_force 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/client.dir/CallUserService.cpp.s" 71 | cd /home/ubuntu/code/RPC/build/example/caller && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/code/RPC/example/caller/CallUserService.cpp -o CMakeFiles/client.dir/CallUserService.cpp.s 72 | 73 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.requires: 74 | 75 | .PHONY : example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.requires 76 | 77 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.provides: example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.requires 78 | $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.provides.build 79 | .PHONY : example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.provides 80 | 81 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.provides.build: example/caller/CMakeFiles/client.dir/CallUserService.cpp.o 82 | 83 | 84 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o: example/caller/CMakeFiles/client.dir/flags.make 85 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o: ../example/src/User.pb.cc 86 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o" 87 | cd /home/ubuntu/code/RPC/build/example/caller && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/client.dir/__/src/User.pb.cc.o -c /home/ubuntu/code/RPC/example/src/User.pb.cc 88 | 89 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.i: cmake_force 90 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/client.dir/__/src/User.pb.cc.i" 91 | cd /home/ubuntu/code/RPC/build/example/caller && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/ubuntu/code/RPC/example/src/User.pb.cc > CMakeFiles/client.dir/__/src/User.pb.cc.i 92 | 93 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.s: cmake_force 94 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/client.dir/__/src/User.pb.cc.s" 95 | cd /home/ubuntu/code/RPC/build/example/caller && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/ubuntu/code/RPC/example/src/User.pb.cc -o CMakeFiles/client.dir/__/src/User.pb.cc.s 96 | 97 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.requires: 98 | 99 | .PHONY : example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.requires 100 | 101 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.provides: example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.requires 102 | $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.provides.build 103 | .PHONY : example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.provides 104 | 105 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.provides.build: example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o 106 | 107 | 108 | # Object files for target client 109 | client_OBJECTS = \ 110 | "CMakeFiles/client.dir/CallUserService.cpp.o" \ 111 | "CMakeFiles/client.dir/__/src/User.pb.cc.o" 112 | 113 | # External object files for target client 114 | client_EXTERNAL_OBJECTS = 115 | 116 | ../bin/client: example/caller/CMakeFiles/client.dir/CallUserService.cpp.o 117 | ../bin/client: example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o 118 | ../bin/client: example/caller/CMakeFiles/client.dir/build.make 119 | ../bin/client: ../lib/librpc.a 120 | ../bin/client: example/caller/CMakeFiles/client.dir/link.txt 121 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/ubuntu/code/RPC/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking CXX executable ../../../bin/client" 122 | cd /home/ubuntu/code/RPC/build/example/caller && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/client.dir/link.txt --verbose=$(VERBOSE) 123 | 124 | # Rule to build all files generated by this target. 125 | example/caller/CMakeFiles/client.dir/build: ../bin/client 126 | 127 | .PHONY : example/caller/CMakeFiles/client.dir/build 128 | 129 | example/caller/CMakeFiles/client.dir/requires: example/caller/CMakeFiles/client.dir/CallUserService.cpp.o.requires 130 | example/caller/CMakeFiles/client.dir/requires: example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o.requires 131 | 132 | .PHONY : example/caller/CMakeFiles/client.dir/requires 133 | 134 | example/caller/CMakeFiles/client.dir/clean: 135 | cd /home/ubuntu/code/RPC/build/example/caller && $(CMAKE_COMMAND) -P CMakeFiles/client.dir/cmake_clean.cmake 136 | .PHONY : example/caller/CMakeFiles/client.dir/clean 137 | 138 | example/caller/CMakeFiles/client.dir/depend: 139 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/ubuntu/code/RPC /home/ubuntu/code/RPC/example/caller /home/ubuntu/code/RPC/build /home/ubuntu/code/RPC/build/example/caller /home/ubuntu/code/RPC/build/example/caller/CMakeFiles/client.dir/DependInfo.cmake --color=$(COLOR) 140 | .PHONY : example/caller/CMakeFiles/client.dir/depend 141 | 142 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/client.dir/CallUserService.cpp.o" 3 | "CMakeFiles/client.dir/__/src/User.pb.cc.o" 4 | "../../../bin/client.pdb" 5 | "../../../bin/client" 6 | ) 7 | 8 | # Per-language clean rules from dependency scanning. 9 | foreach(lang CXX) 10 | include(CMakeFiles/client.dir/cmake_clean_${lang}.cmake OPTIONAL) 11 | endforeach() 12 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o 5 | ../example/include/User.pb.h 6 | ../src/include/RpcApplication.hpp 7 | ../src/include/RpcChannel.hpp 8 | ../src/include/RpcConfigure.hpp 9 | ../src/include/RpcControl.hpp 10 | /home/ubuntu/code/RPC/example/caller/CallUserService.cpp 11 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o 12 | ../example/include/User.pb.h 13 | /home/ubuntu/code/RPC/example/src/User.pb.cc 14 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../example/include/User.pb.h 5 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../src/include/RpcApplication.hpp 6 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../src/include/RpcChannel.hpp 7 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../src/include/RpcConfigure.hpp 8 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../src/include/RpcControl.hpp 9 | example/caller/CMakeFiles/client.dir/CallUserService.cpp.o: ../example/caller/CallUserService.cpp 10 | 11 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o: ../example/include/User.pb.h 12 | example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o: ../example/src/User.pb.cc 13 | 14 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -g 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/home/ubuntu/code/RPC/src/include -I/home/ubuntu/code/RPC/example/include 10 | 11 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -g -rdynamic CMakeFiles/client.dir/CallUserService.cpp.o CMakeFiles/client.dir/__/src/User.pb.cc.o -o ../../../bin/client -L/home/ubuntu/code/RPC/thirdlib -Wl,-rpath,/home/ubuntu/code/RPC/thirdlib ../../../lib/librpc.a -lprotobuf -lmuduo_base -lpthread -lzookeeper_mt -lmuduo_net -lzookeeper_mt 2 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/client.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | 5 | -------------------------------------------------------------------------------- /build/example/caller/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /build/example/caller/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles /home/ubuntu/code/RPC/build/example/caller/CMakeFiles/progress.marks 84 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Convenience name for target. 114 | example/caller/CMakeFiles/client.dir/rule: 115 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/caller/CMakeFiles/client.dir/rule 116 | .PHONY : example/caller/CMakeFiles/client.dir/rule 117 | 118 | # Convenience name for target. 119 | client: example/caller/CMakeFiles/client.dir/rule 120 | 121 | .PHONY : client 122 | 123 | # fast build rule for target. 124 | client/fast: 125 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/build 126 | .PHONY : client/fast 127 | 128 | CallUserService.o: CallUserService.cpp.o 129 | 130 | .PHONY : CallUserService.o 131 | 132 | # target to build an object file 133 | CallUserService.cpp.o: 134 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/CallUserService.cpp.o 135 | .PHONY : CallUserService.cpp.o 136 | 137 | CallUserService.i: CallUserService.cpp.i 138 | 139 | .PHONY : CallUserService.i 140 | 141 | # target to preprocess a source file 142 | CallUserService.cpp.i: 143 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/CallUserService.cpp.i 144 | .PHONY : CallUserService.cpp.i 145 | 146 | CallUserService.s: CallUserService.cpp.s 147 | 148 | .PHONY : CallUserService.s 149 | 150 | # target to generate assembly for a file 151 | CallUserService.cpp.s: 152 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/CallUserService.cpp.s 153 | .PHONY : CallUserService.cpp.s 154 | 155 | __/src/User.pb.o: __/src/User.pb.cc.o 156 | 157 | .PHONY : __/src/User.pb.o 158 | 159 | # target to build an object file 160 | __/src/User.pb.cc.o: 161 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.o 162 | .PHONY : __/src/User.pb.cc.o 163 | 164 | __/src/User.pb.i: __/src/User.pb.cc.i 165 | 166 | .PHONY : __/src/User.pb.i 167 | 168 | # target to preprocess a source file 169 | __/src/User.pb.cc.i: 170 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.i 171 | .PHONY : __/src/User.pb.cc.i 172 | 173 | __/src/User.pb.s: __/src/User.pb.cc.s 174 | 175 | .PHONY : __/src/User.pb.s 176 | 177 | # target to generate assembly for a file 178 | __/src/User.pb.cc.s: 179 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f example/caller/CMakeFiles/client.dir/build.make example/caller/CMakeFiles/client.dir/__/src/User.pb.cc.s 180 | .PHONY : __/src/User.pb.cc.s 181 | 182 | # Help Target 183 | help: 184 | @echo "The following are some of the valid targets for this Makefile:" 185 | @echo "... all (the default if no target is provided)" 186 | @echo "... clean" 187 | @echo "... depend" 188 | @echo "... rebuild_cache" 189 | @echo "... client" 190 | @echo "... edit_cache" 191 | @echo "... CallUserService.o" 192 | @echo "... CallUserService.i" 193 | @echo "... CallUserService.s" 194 | @echo "... __/src/User.pb.o" 195 | @echo "... __/src/User.pb.i" 196 | @echo "... __/src/User.pb.s" 197 | .PHONY : help 198 | 199 | 200 | 201 | #============================================================================= 202 | # Special targets to cleanup operation of make. 203 | 204 | # Special rule to run CMake to check the build system integrity. 205 | # No rule that depends on this can have commands that come from listfiles 206 | # because they might be regenerated. 207 | cmake_check_build_system: 208 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 209 | .PHONY : cmake_check_build_system 210 | 211 | -------------------------------------------------------------------------------- /build/example/caller/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/code/RPC/example/caller 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /build/example/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/code/RPC/example 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | if(NOT CMAKE_INSTALL_LOCAL_ONLY) 41 | # Include the install script for each subdirectory. 42 | include("/home/ubuntu/code/RPC/build/example/src/cmake_install.cmake") 43 | include("/home/ubuntu/code/RPC/build/example/callee/cmake_install.cmake") 44 | include("/home/ubuntu/code/RPC/build/example/caller/cmake_install.cmake") 45 | 46 | endif() 47 | 48 | -------------------------------------------------------------------------------- /build/example/src/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/code/RPC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/code/RPC/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/example/src/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /build/example/src/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles /home/ubuntu/code/RPC/build/example/src/CMakeFiles/progress.marks 84 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/src/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/src/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/src/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 example/src/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Help Target 114 | help: 115 | @echo "The following are some of the valid targets for this Makefile:" 116 | @echo "... all (the default if no target is provided)" 117 | @echo "... clean" 118 | @echo "... depend" 119 | @echo "... rebuild_cache" 120 | @echo "... edit_cache" 121 | .PHONY : help 122 | 123 | 124 | 125 | #============================================================================= 126 | # Special targets to cleanup operation of make. 127 | 128 | # Special rule to run CMake to check the build system integrity. 129 | # No rule that depends on this can have commands that come from listfiles 130 | # because they might be regenerated. 131 | cmake_check_build_system: 132 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 133 | .PHONY : cmake_check_build_system 134 | 135 | -------------------------------------------------------------------------------- /build/example/src/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/code/RPC/example/src 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/ubuntu/code/RPC") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/ubuntu/code/RPC/build") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | ../src/include/LoggerQueue.hpp 10 | queue 11 | - 12 | mutex 13 | - 14 | thread 15 | - 16 | condition_variable 17 | - 18 | 19 | ../src/include/RpcApplication.hpp 20 | RpcConfigure.hpp 21 | ../src/include/RpcConfigure.hpp 22 | 23 | ../src/include/RpcChannel.hpp 24 | google/protobuf/service.h 25 | - 26 | google/protobuf/descriptor.h 27 | - 28 | google/protobuf/message.h 29 | - 30 | string 31 | - 32 | iostream 33 | - 34 | 35 | ../src/include/RpcConfigure.hpp 36 | unordered_map 37 | - 38 | string 39 | - 40 | 41 | ../src/include/RpcControl.hpp 42 | google/protobuf/service.h 43 | - 44 | string 45 | - 46 | 47 | ../src/include/RpcHeader.pb.h 48 | string 49 | - 50 | google/protobuf/stubs/common.h 51 | - 52 | google/protobuf/arena.h 53 | - 54 | google/protobuf/arenastring.h 55 | - 56 | google/protobuf/generated_message_util.h 57 | - 58 | google/protobuf/metadata.h 59 | - 60 | google/protobuf/message.h 61 | - 62 | google/protobuf/repeated_field.h 63 | - 64 | google/protobuf/extension_set.h 65 | - 66 | google/protobuf/unknown_field_set.h 67 | - 68 | 69 | ../src/include/RpcLogger.hpp 70 | LoggerQueue.hpp 71 | ../src/include/LoggerQueue.hpp 72 | string 73 | - 74 | time.h 75 | - 76 | 77 | ../src/include/RpcProvider.hpp 78 | google/protobuf/service.h 79 | - 80 | google/protobuf/descriptor.h 81 | - 82 | muduo/net/TcpServer.h 83 | - 84 | muduo/net/EventLoop.h 85 | - 86 | muduo/net/InetAddress.h 87 | - 88 | muduo/net/TcpConnection.h 89 | - 90 | muduo/net/Buffer.h 91 | - 92 | unordered_map 93 | - 94 | string 95 | - 96 | iostream 97 | - 98 | functional 99 | - 100 | 101 | ../src/include/ZookeeperClient.hpp 102 | semaphore.h 103 | - 104 | zookeeper/zookeeper.h 105 | - 106 | string 107 | - 108 | 109 | /home/ubuntu/code/RPC/src/RpcApplication.cpp 110 | RpcApplication.hpp 111 | /home/ubuntu/code/RPC/src/RpcApplication.hpp 112 | muduo/base/Logging.h 113 | - 114 | iostream 115 | - 116 | unistd.h 117 | - 118 | string 119 | - 120 | 121 | /home/ubuntu/code/RPC/src/RpcChannel.cpp 122 | RpcChannel.hpp 123 | /home/ubuntu/code/RPC/src/RpcChannel.hpp 124 | RpcApplication.hpp 125 | /home/ubuntu/code/RPC/src/RpcApplication.hpp 126 | RpcControl.hpp 127 | /home/ubuntu/code/RPC/src/RpcControl.hpp 128 | RpcHeader.pb.h 129 | /home/ubuntu/code/RPC/src/RpcHeader.pb.h 130 | RpcLogger.hpp 131 | /home/ubuntu/code/RPC/src/RpcLogger.hpp 132 | ZookeeperClient.hpp 133 | /home/ubuntu/code/RPC/src/ZookeeperClient.hpp 134 | sys/socket.h 135 | - 136 | netinet/in.h 137 | - 138 | arpa/inet.h 139 | - 140 | sys/types.h 141 | - 142 | unistd.h 143 | - 144 | errno.h 145 | - 146 | 147 | /home/ubuntu/code/RPC/src/RpcConfigure.cpp 148 | RpcConfigure.hpp 149 | /home/ubuntu/code/RPC/src/RpcConfigure.hpp 150 | RpcLogger.hpp 151 | /home/ubuntu/code/RPC/src/RpcLogger.hpp 152 | muduo/base/Logging.h 153 | - 154 | string 155 | - 156 | iostream 157 | - 158 | 159 | /home/ubuntu/code/RPC/src/RpcControl.cpp 160 | RpcControl.hpp 161 | /home/ubuntu/code/RPC/src/RpcControl.hpp 162 | 163 | /home/ubuntu/code/RPC/src/RpcHeader.pb.cc 164 | RpcHeader.pb.h 165 | /home/ubuntu/code/RPC/src/RpcHeader.pb.h 166 | algorithm 167 | - 168 | google/protobuf/stubs/common.h 169 | - 170 | google/protobuf/stubs/port.h 171 | - 172 | google/protobuf/stubs/once.h 173 | - 174 | google/protobuf/io/coded_stream.h 175 | - 176 | google/protobuf/wire_format_lite_inl.h 177 | - 178 | google/protobuf/descriptor.h 179 | - 180 | google/protobuf/generated_message_reflection.h 181 | - 182 | google/protobuf/reflection_ops.h 183 | - 184 | google/protobuf/wire_format.h 185 | - 186 | 187 | /home/ubuntu/code/RPC/src/RpcLogger.cpp 188 | RpcLogger.hpp 189 | /home/ubuntu/code/RPC/src/RpcLogger.hpp 190 | muduo/base/Logging.h 191 | - 192 | unistd.h 193 | - 194 | 195 | /home/ubuntu/code/RPC/src/RpcProvider.cpp 196 | RpcProvider.hpp 197 | /home/ubuntu/code/RPC/src/RpcProvider.hpp 198 | RpcApplication.hpp 199 | /home/ubuntu/code/RPC/src/RpcApplication.hpp 200 | RpcHeader.pb.h 201 | /home/ubuntu/code/RPC/src/RpcHeader.pb.h 202 | RpcLogger.hpp 203 | /home/ubuntu/code/RPC/src/RpcLogger.hpp 204 | ZookeeperClient.hpp 205 | /home/ubuntu/code/RPC/src/ZookeeperClient.hpp 206 | 207 | /home/ubuntu/code/RPC/src/ZookeeperClient.cpp 208 | ZookeeperClient.hpp 209 | /home/ubuntu/code/RPC/src/ZookeeperClient.hpp 210 | RpcApplication.hpp 211 | /home/ubuntu/code/RPC/src/RpcApplication.hpp 212 | RpcLogger.hpp 213 | /home/ubuntu/code/RPC/src/RpcLogger.hpp 214 | iostream 215 | - 216 | 217 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/home/ubuntu/code/RPC/src/RpcApplication.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcApplication.cpp.o" 8 | "/home/ubuntu/code/RPC/src/RpcChannel.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcChannel.cpp.o" 9 | "/home/ubuntu/code/RPC/src/RpcConfigure.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o" 10 | "/home/ubuntu/code/RPC/src/RpcControl.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcControl.cpp.o" 11 | "/home/ubuntu/code/RPC/src/RpcHeader.pb.cc" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o" 12 | "/home/ubuntu/code/RPC/src/RpcLogger.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcLogger.cpp.o" 13 | "/home/ubuntu/code/RPC/src/RpcProvider.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/RpcProvider.cpp.o" 14 | "/home/ubuntu/code/RPC/src/ZookeeperClient.cpp" "/home/ubuntu/code/RPC/build/src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o" 15 | ) 16 | set(CMAKE_CXX_COMPILER_ID "GNU") 17 | 18 | # The include file search paths: 19 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 20 | "../src/include" 21 | "../example/include" 22 | ) 23 | 24 | # Targets to which this target links. 25 | set(CMAKE_TARGET_LINKED_INFO_FILES 26 | ) 27 | 28 | # Fortran module output directory. 29 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 30 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcApplication.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcApplication.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcChannel.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcControl.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcControl.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcLogger.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcLogger.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/RpcProvider.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/build/src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/rpc.dir/RpcApplication.cpp.o" 3 | "CMakeFiles/rpc.dir/RpcChannel.cpp.o" 4 | "CMakeFiles/rpc.dir/RpcConfigure.cpp.o" 5 | "CMakeFiles/rpc.dir/RpcControl.cpp.o" 6 | "CMakeFiles/rpc.dir/RpcHeader.pb.cc.o" 7 | "CMakeFiles/rpc.dir/RpcLogger.cpp.o" 8 | "CMakeFiles/rpc.dir/RpcProvider.cpp.o" 9 | "CMakeFiles/rpc.dir/ZookeeperClient.cpp.o" 10 | "../../lib/librpc.pdb" 11 | "../../lib/librpc.a" 12 | ) 13 | 14 | # Per-language clean rules from dependency scanning. 15 | foreach(lang CXX) 16 | include(CMakeFiles/rpc.dir/cmake_clean_${lang}.cmake OPTIONAL) 17 | endforeach() 18 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/cmake_clean_target.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "../../lib/librpc.a" 3 | ) 4 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | src/CMakeFiles/rpc.dir/RpcApplication.cpp.o 5 | ../src/include/RpcApplication.hpp 6 | ../src/include/RpcConfigure.hpp 7 | /home/ubuntu/code/RPC/src/RpcApplication.cpp 8 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o 9 | ../src/include/LoggerQueue.hpp 10 | ../src/include/RpcApplication.hpp 11 | ../src/include/RpcChannel.hpp 12 | ../src/include/RpcConfigure.hpp 13 | ../src/include/RpcControl.hpp 14 | ../src/include/RpcHeader.pb.h 15 | ../src/include/RpcLogger.hpp 16 | ../src/include/ZookeeperClient.hpp 17 | /home/ubuntu/code/RPC/src/RpcChannel.cpp 18 | src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o 19 | ../src/include/LoggerQueue.hpp 20 | ../src/include/RpcConfigure.hpp 21 | ../src/include/RpcLogger.hpp 22 | /home/ubuntu/code/RPC/src/RpcConfigure.cpp 23 | src/CMakeFiles/rpc.dir/RpcControl.cpp.o 24 | ../src/include/RpcControl.hpp 25 | /home/ubuntu/code/RPC/src/RpcControl.cpp 26 | src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o 27 | ../src/include/RpcHeader.pb.h 28 | /home/ubuntu/code/RPC/src/RpcHeader.pb.cc 29 | src/CMakeFiles/rpc.dir/RpcLogger.cpp.o 30 | ../src/include/LoggerQueue.hpp 31 | ../src/include/RpcLogger.hpp 32 | /home/ubuntu/code/RPC/src/RpcLogger.cpp 33 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o 34 | ../src/include/LoggerQueue.hpp 35 | ../src/include/RpcApplication.hpp 36 | ../src/include/RpcConfigure.hpp 37 | ../src/include/RpcHeader.pb.h 38 | ../src/include/RpcLogger.hpp 39 | ../src/include/RpcProvider.hpp 40 | ../src/include/ZookeeperClient.hpp 41 | /home/ubuntu/code/RPC/src/RpcProvider.cpp 42 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o 43 | ../src/include/LoggerQueue.hpp 44 | ../src/include/RpcApplication.hpp 45 | ../src/include/RpcConfigure.hpp 46 | ../src/include/RpcLogger.hpp 47 | ../src/include/ZookeeperClient.hpp 48 | /home/ubuntu/code/RPC/src/ZookeeperClient.cpp 49 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | src/CMakeFiles/rpc.dir/RpcApplication.cpp.o: ../src/include/RpcApplication.hpp 5 | src/CMakeFiles/rpc.dir/RpcApplication.cpp.o: ../src/include/RpcConfigure.hpp 6 | src/CMakeFiles/rpc.dir/RpcApplication.cpp.o: ../src/RpcApplication.cpp 7 | 8 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/LoggerQueue.hpp 9 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/RpcApplication.hpp 10 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/RpcChannel.hpp 11 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/RpcConfigure.hpp 12 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/RpcControl.hpp 13 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/RpcHeader.pb.h 14 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/RpcLogger.hpp 15 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/include/ZookeeperClient.hpp 16 | src/CMakeFiles/rpc.dir/RpcChannel.cpp.o: ../src/RpcChannel.cpp 17 | 18 | src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o: ../src/include/LoggerQueue.hpp 19 | src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o: ../src/include/RpcConfigure.hpp 20 | src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o: ../src/include/RpcLogger.hpp 21 | src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o: ../src/RpcConfigure.cpp 22 | 23 | src/CMakeFiles/rpc.dir/RpcControl.cpp.o: ../src/include/RpcControl.hpp 24 | src/CMakeFiles/rpc.dir/RpcControl.cpp.o: ../src/RpcControl.cpp 25 | 26 | src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o: ../src/include/RpcHeader.pb.h 27 | src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o: ../src/RpcHeader.pb.cc 28 | 29 | src/CMakeFiles/rpc.dir/RpcLogger.cpp.o: ../src/include/LoggerQueue.hpp 30 | src/CMakeFiles/rpc.dir/RpcLogger.cpp.o: ../src/include/RpcLogger.hpp 31 | src/CMakeFiles/rpc.dir/RpcLogger.cpp.o: ../src/RpcLogger.cpp 32 | 33 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/LoggerQueue.hpp 34 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/RpcApplication.hpp 35 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/RpcConfigure.hpp 36 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/RpcHeader.pb.h 37 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/RpcLogger.hpp 38 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/RpcProvider.hpp 39 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/include/ZookeeperClient.hpp 40 | src/CMakeFiles/rpc.dir/RpcProvider.cpp.o: ../src/RpcProvider.cpp 41 | 42 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: ../src/include/LoggerQueue.hpp 43 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: ../src/include/RpcApplication.hpp 44 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: ../src/include/RpcConfigure.hpp 45 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: ../src/include/RpcLogger.hpp 46 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: ../src/include/ZookeeperClient.hpp 47 | src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o: ../src/ZookeeperClient.cpp 48 | 49 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_FLAGS = -g 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/home/ubuntu/code/RPC/src/include -I/home/ubuntu/code/RPC/example/include 10 | 11 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/ar qc ../../lib/librpc.a CMakeFiles/rpc.dir/RpcApplication.cpp.o CMakeFiles/rpc.dir/RpcChannel.cpp.o CMakeFiles/rpc.dir/RpcConfigure.cpp.o CMakeFiles/rpc.dir/RpcControl.cpp.o CMakeFiles/rpc.dir/RpcHeader.pb.cc.o CMakeFiles/rpc.dir/RpcLogger.cpp.o CMakeFiles/rpc.dir/RpcProvider.cpp.o CMakeFiles/rpc.dir/ZookeeperClient.cpp.o 2 | /usr/bin/ranlib ../../lib/librpc.a 3 | -------------------------------------------------------------------------------- /build/src/CMakeFiles/rpc.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 7 2 | CMAKE_PROGRESS_2 = 8 3 | CMAKE_PROGRESS_3 = 9 4 | CMAKE_PROGRESS_4 = 10 5 | CMAKE_PROGRESS_5 = 11 6 | CMAKE_PROGRESS_6 = 12 7 | CMAKE_PROGRESS_7 = 13 8 | CMAKE_PROGRESS_8 = 14 9 | CMAKE_PROGRESS_9 = 15 10 | 11 | -------------------------------------------------------------------------------- /build/src/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Remove some rules from gmake that .SUFFIXES does not remove. 21 | SUFFIXES = 22 | 23 | .SUFFIXES: .hpux_make_needs_suffix_list 24 | 25 | 26 | # Suppress display of executed commands. 27 | $(VERBOSE).SILENT: 28 | 29 | 30 | # A target that is always out of date. 31 | cmake_force: 32 | 33 | .PHONY : cmake_force 34 | 35 | #============================================================================= 36 | # Set environment variables for the build. 37 | 38 | # The shell in which to execute make rules. 39 | SHELL = /bin/sh 40 | 41 | # The CMake executable. 42 | CMAKE_COMMAND = /usr/bin/cmake 43 | 44 | # The command to remove a file. 45 | RM = /usr/bin/cmake -E remove -f 46 | 47 | # Escaping for special characters. 48 | EQUALS = = 49 | 50 | # The top-level source directory on which CMake was run. 51 | CMAKE_SOURCE_DIR = /home/ubuntu/code/RPC 52 | 53 | # The top-level build directory on which CMake was run. 54 | CMAKE_BINARY_DIR = /home/ubuntu/code/RPC/build 55 | 56 | #============================================================================= 57 | # Targets provided globally by CMake. 58 | 59 | # Special rule for the target rebuild_cache 60 | rebuild_cache: 61 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 62 | /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 63 | .PHONY : rebuild_cache 64 | 65 | # Special rule for the target rebuild_cache 66 | rebuild_cache/fast: rebuild_cache 67 | 68 | .PHONY : rebuild_cache/fast 69 | 70 | # Special rule for the target edit_cache 71 | edit_cache: 72 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." 73 | /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. 74 | .PHONY : edit_cache 75 | 76 | # Special rule for the target edit_cache 77 | edit_cache/fast: edit_cache 78 | 79 | .PHONY : edit_cache/fast 80 | 81 | # The main all target 82 | all: cmake_check_build_system 83 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles /home/ubuntu/code/RPC/build/src/CMakeFiles/progress.marks 84 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 src/all 85 | $(CMAKE_COMMAND) -E cmake_progress_start /home/ubuntu/code/RPC/build/CMakeFiles 0 86 | .PHONY : all 87 | 88 | # The main clean target 89 | clean: 90 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 src/clean 91 | .PHONY : clean 92 | 93 | # The main clean target 94 | clean/fast: clean 95 | 96 | .PHONY : clean/fast 97 | 98 | # Prepare targets for installation. 99 | preinstall: all 100 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall 101 | .PHONY : preinstall 102 | 103 | # Prepare targets for installation. 104 | preinstall/fast: 105 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 src/preinstall 106 | .PHONY : preinstall/fast 107 | 108 | # clear depends 109 | depend: 110 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 111 | .PHONY : depend 112 | 113 | # Convenience name for target. 114 | src/CMakeFiles/rpc.dir/rule: 115 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f CMakeFiles/Makefile2 src/CMakeFiles/rpc.dir/rule 116 | .PHONY : src/CMakeFiles/rpc.dir/rule 117 | 118 | # Convenience name for target. 119 | rpc: src/CMakeFiles/rpc.dir/rule 120 | 121 | .PHONY : rpc 122 | 123 | # fast build rule for target. 124 | rpc/fast: 125 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/build 126 | .PHONY : rpc/fast 127 | 128 | RpcApplication.o: RpcApplication.cpp.o 129 | 130 | .PHONY : RpcApplication.o 131 | 132 | # target to build an object file 133 | RpcApplication.cpp.o: 134 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcApplication.cpp.o 135 | .PHONY : RpcApplication.cpp.o 136 | 137 | RpcApplication.i: RpcApplication.cpp.i 138 | 139 | .PHONY : RpcApplication.i 140 | 141 | # target to preprocess a source file 142 | RpcApplication.cpp.i: 143 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcApplication.cpp.i 144 | .PHONY : RpcApplication.cpp.i 145 | 146 | RpcApplication.s: RpcApplication.cpp.s 147 | 148 | .PHONY : RpcApplication.s 149 | 150 | # target to generate assembly for a file 151 | RpcApplication.cpp.s: 152 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcApplication.cpp.s 153 | .PHONY : RpcApplication.cpp.s 154 | 155 | RpcChannel.o: RpcChannel.cpp.o 156 | 157 | .PHONY : RpcChannel.o 158 | 159 | # target to build an object file 160 | RpcChannel.cpp.o: 161 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcChannel.cpp.o 162 | .PHONY : RpcChannel.cpp.o 163 | 164 | RpcChannel.i: RpcChannel.cpp.i 165 | 166 | .PHONY : RpcChannel.i 167 | 168 | # target to preprocess a source file 169 | RpcChannel.cpp.i: 170 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcChannel.cpp.i 171 | .PHONY : RpcChannel.cpp.i 172 | 173 | RpcChannel.s: RpcChannel.cpp.s 174 | 175 | .PHONY : RpcChannel.s 176 | 177 | # target to generate assembly for a file 178 | RpcChannel.cpp.s: 179 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcChannel.cpp.s 180 | .PHONY : RpcChannel.cpp.s 181 | 182 | RpcConfigure.o: RpcConfigure.cpp.o 183 | 184 | .PHONY : RpcConfigure.o 185 | 186 | # target to build an object file 187 | RpcConfigure.cpp.o: 188 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcConfigure.cpp.o 189 | .PHONY : RpcConfigure.cpp.o 190 | 191 | RpcConfigure.i: RpcConfigure.cpp.i 192 | 193 | .PHONY : RpcConfigure.i 194 | 195 | # target to preprocess a source file 196 | RpcConfigure.cpp.i: 197 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcConfigure.cpp.i 198 | .PHONY : RpcConfigure.cpp.i 199 | 200 | RpcConfigure.s: RpcConfigure.cpp.s 201 | 202 | .PHONY : RpcConfigure.s 203 | 204 | # target to generate assembly for a file 205 | RpcConfigure.cpp.s: 206 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcConfigure.cpp.s 207 | .PHONY : RpcConfigure.cpp.s 208 | 209 | RpcControl.o: RpcControl.cpp.o 210 | 211 | .PHONY : RpcControl.o 212 | 213 | # target to build an object file 214 | RpcControl.cpp.o: 215 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcControl.cpp.o 216 | .PHONY : RpcControl.cpp.o 217 | 218 | RpcControl.i: RpcControl.cpp.i 219 | 220 | .PHONY : RpcControl.i 221 | 222 | # target to preprocess a source file 223 | RpcControl.cpp.i: 224 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcControl.cpp.i 225 | .PHONY : RpcControl.cpp.i 226 | 227 | RpcControl.s: RpcControl.cpp.s 228 | 229 | .PHONY : RpcControl.s 230 | 231 | # target to generate assembly for a file 232 | RpcControl.cpp.s: 233 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcControl.cpp.s 234 | .PHONY : RpcControl.cpp.s 235 | 236 | RpcHeader.pb.o: RpcHeader.pb.cc.o 237 | 238 | .PHONY : RpcHeader.pb.o 239 | 240 | # target to build an object file 241 | RpcHeader.pb.cc.o: 242 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.o 243 | .PHONY : RpcHeader.pb.cc.o 244 | 245 | RpcHeader.pb.i: RpcHeader.pb.cc.i 246 | 247 | .PHONY : RpcHeader.pb.i 248 | 249 | # target to preprocess a source file 250 | RpcHeader.pb.cc.i: 251 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.i 252 | .PHONY : RpcHeader.pb.cc.i 253 | 254 | RpcHeader.pb.s: RpcHeader.pb.cc.s 255 | 256 | .PHONY : RpcHeader.pb.s 257 | 258 | # target to generate assembly for a file 259 | RpcHeader.pb.cc.s: 260 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcHeader.pb.cc.s 261 | .PHONY : RpcHeader.pb.cc.s 262 | 263 | RpcLogger.o: RpcLogger.cpp.o 264 | 265 | .PHONY : RpcLogger.o 266 | 267 | # target to build an object file 268 | RpcLogger.cpp.o: 269 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcLogger.cpp.o 270 | .PHONY : RpcLogger.cpp.o 271 | 272 | RpcLogger.i: RpcLogger.cpp.i 273 | 274 | .PHONY : RpcLogger.i 275 | 276 | # target to preprocess a source file 277 | RpcLogger.cpp.i: 278 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcLogger.cpp.i 279 | .PHONY : RpcLogger.cpp.i 280 | 281 | RpcLogger.s: RpcLogger.cpp.s 282 | 283 | .PHONY : RpcLogger.s 284 | 285 | # target to generate assembly for a file 286 | RpcLogger.cpp.s: 287 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcLogger.cpp.s 288 | .PHONY : RpcLogger.cpp.s 289 | 290 | RpcProvider.o: RpcProvider.cpp.o 291 | 292 | .PHONY : RpcProvider.o 293 | 294 | # target to build an object file 295 | RpcProvider.cpp.o: 296 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcProvider.cpp.o 297 | .PHONY : RpcProvider.cpp.o 298 | 299 | RpcProvider.i: RpcProvider.cpp.i 300 | 301 | .PHONY : RpcProvider.i 302 | 303 | # target to preprocess a source file 304 | RpcProvider.cpp.i: 305 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcProvider.cpp.i 306 | .PHONY : RpcProvider.cpp.i 307 | 308 | RpcProvider.s: RpcProvider.cpp.s 309 | 310 | .PHONY : RpcProvider.s 311 | 312 | # target to generate assembly for a file 313 | RpcProvider.cpp.s: 314 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/RpcProvider.cpp.s 315 | .PHONY : RpcProvider.cpp.s 316 | 317 | ZookeeperClient.o: ZookeeperClient.cpp.o 318 | 319 | .PHONY : ZookeeperClient.o 320 | 321 | # target to build an object file 322 | ZookeeperClient.cpp.o: 323 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.o 324 | .PHONY : ZookeeperClient.cpp.o 325 | 326 | ZookeeperClient.i: ZookeeperClient.cpp.i 327 | 328 | .PHONY : ZookeeperClient.i 329 | 330 | # target to preprocess a source file 331 | ZookeeperClient.cpp.i: 332 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.i 333 | .PHONY : ZookeeperClient.cpp.i 334 | 335 | ZookeeperClient.s: ZookeeperClient.cpp.s 336 | 337 | .PHONY : ZookeeperClient.s 338 | 339 | # target to generate assembly for a file 340 | ZookeeperClient.cpp.s: 341 | cd /home/ubuntu/code/RPC/build && $(MAKE) -f src/CMakeFiles/rpc.dir/build.make src/CMakeFiles/rpc.dir/ZookeeperClient.cpp.s 342 | .PHONY : ZookeeperClient.cpp.s 343 | 344 | # Help Target 345 | help: 346 | @echo "The following are some of the valid targets for this Makefile:" 347 | @echo "... all (the default if no target is provided)" 348 | @echo "... clean" 349 | @echo "... depend" 350 | @echo "... rebuild_cache" 351 | @echo "... rpc" 352 | @echo "... edit_cache" 353 | @echo "... RpcApplication.o" 354 | @echo "... RpcApplication.i" 355 | @echo "... RpcApplication.s" 356 | @echo "... RpcChannel.o" 357 | @echo "... RpcChannel.i" 358 | @echo "... RpcChannel.s" 359 | @echo "... RpcConfigure.o" 360 | @echo "... RpcConfigure.i" 361 | @echo "... RpcConfigure.s" 362 | @echo "... RpcControl.o" 363 | @echo "... RpcControl.i" 364 | @echo "... RpcControl.s" 365 | @echo "... RpcHeader.pb.o" 366 | @echo "... RpcHeader.pb.i" 367 | @echo "... RpcHeader.pb.s" 368 | @echo "... RpcLogger.o" 369 | @echo "... RpcLogger.i" 370 | @echo "... RpcLogger.s" 371 | @echo "... RpcProvider.o" 372 | @echo "... RpcProvider.i" 373 | @echo "... RpcProvider.s" 374 | @echo "... ZookeeperClient.o" 375 | @echo "... ZookeeperClient.i" 376 | @echo "... ZookeeperClient.s" 377 | .PHONY : help 378 | 379 | 380 | 381 | #============================================================================= 382 | # Special targets to cleanup operation of make. 383 | 384 | # Special rule to run CMake to check the build system integrity. 385 | # No rule that depends on this can have commands that come from listfiles 386 | # because they might be regenerated. 387 | cmake_check_build_system: 388 | cd /home/ubuntu/code/RPC/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 389 | .PHONY : cmake_check_build_system 390 | 391 | -------------------------------------------------------------------------------- /build/src/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/ubuntu/code/RPC/src 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(src) 2 | add_subdirectory(callee) 3 | add_subdirectory(caller) -------------------------------------------------------------------------------- /example/callee/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. SRC_LIST) 2 | aux_source_directory(../src PROTO_LIST) 3 | add_executable(provider ${SRC_LIST} ${PROTO_LIST}) 4 | target_link_libraries(provider rpc protobuf muduo_base pthread zookeeper_mt) -------------------------------------------------------------------------------- /example/callee/UserService.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "User.pb.h" 4 | #include "RpcApplication.hpp" 5 | #include "RpcProvider.hpp" 6 | #include "RpcLogger.hpp" 7 | 8 | using namespace std; 9 | /* 10 | * UserService 是一个本地服务,提供了两个进程内的本地方法,login和getfriendlist 11 | */ 12 | class UserService : public ik::UserServiceRpc //使用在rpc服务发布端 13 | { 14 | public: 15 | bool Login(string name, string password) 16 | { 17 | cout << "doing local service:login: "; 18 | cout << "name: " << name << " password: " << password << endl; 19 | return true; 20 | } 21 | 22 | bool Register(uint32_t id, string name, string password) 23 | { 24 | cout << "doing local service:register: "; 25 | cout << "id:" << id << "name: " << name << " password: " << password << endl; 26 | return true; 27 | } 28 | 29 | //重写基类UserServiceRpc的虚函数,供框架调用 30 | void Login(::google::protobuf::RpcController *controller, 31 | const ::ik::LoginRequest *request, 32 | ::ik::LoginResponse *response, 33 | ::google::protobuf::Closure *done) 34 | { 35 | //框架给业务上报了请求参数 request,业务获取相应数据做本地业务 36 | string name = request->name(); 37 | string password = request->password(); 38 | 39 | //本地业务 40 | bool login_result = Login(name, password); 41 | 42 | //把响应给调用方返回 43 | ik::ErrorMsg *errmsg = response->mutable_errmsg(); 44 | errmsg->set_error(0); 45 | errmsg->set_error_msg(""); 46 | response->set_success(login_result); 47 | 48 | //执行回调操作 49 | done->Run(); 50 | } 51 | 52 | void Register(::google::protobuf::RpcController *controller, 53 | const ::ik::RegisterRequest *request, 54 | ::ik::RegisterResponse *response, 55 | ::google::protobuf::Closure *done) 56 | { 57 | //框架给业务上报了请求参数 request,业务获取相应数据做本地业务 58 | uint32_t id = request->id(); 59 | string name = request->name(); 60 | string password = request->password(); 61 | 62 | //本地业务 63 | bool login_result = Register(id, name, password); 64 | 65 | //把响应给调用方返回 66 | ik::ErrorMsg *errmsg = response->mutable_error(); 67 | errmsg->set_error(0); 68 | errmsg->set_error_msg(""); 69 | response->set_success(login_result); 70 | 71 | //执行回调操作 72 | done->Run(); 73 | } 74 | }; 75 | 76 | int main(int argc, char **argv) 77 | { 78 | RPC_LOG_INFO("HELLO"); 79 | RPC_LOG_ERROR("%s,%s,%d", __FILE__, __FUNCTION__, __LINE__); 80 | //调用框架的初始化操作 81 | RpcApplication::init(argc, argv); 82 | 83 | //框架服务提供provider 84 | RpcProvider provide; 85 | provide.notify_service(new UserService()); 86 | provide.run(); 87 | return 0; 88 | } -------------------------------------------------------------------------------- /example/caller/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. SRC_LIST) 2 | aux_source_directory(../src PROTO_LIST) 3 | add_executable(client ${SRC_LIST} ${PROTO_LIST}) 4 | target_link_libraries(client rpc protobuf muduo_base pthread zookeeper_mt) -------------------------------------------------------------------------------- /example/caller/CallUserService.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "RpcApplication.hpp" 3 | #include "RpcControl.hpp" 4 | #include "User.pb.h" 5 | #include "RpcChannel.hpp" 6 | 7 | int main(int argc, char **argv) 8 | { 9 | //初始化ip地址和端口号 10 | RpcApplication::init(argc, argv); 11 | 12 | //演示调用远程发布的rpc方法login 13 | ik::UserServiceRpc_Stub stub(new RpcChannel()); 14 | 15 | //请求参数和响应 16 | ik::LoginRequest request; 17 | request.set_name("zhang san"); 18 | request.set_password("123456"); 19 | 20 | ik::LoginResponse response; 21 | 22 | //发起rpc调用,等待响应返回 23 | stub.Login(nullptr, &request, &response, nullptr); 24 | 25 | //rpc调用完成,读调用的结果 26 | if (response.errmsg().error() == 0) 27 | { 28 | //没错误 29 | cout << "rpc login response: " << response.success() << endl; 30 | } 31 | else 32 | { 33 | //有错误 34 | cout << "rpc login response errer: " << response.errmsg().error_msg() << endl; 35 | } 36 | 37 | ik::RegisterRequest reg_request; 38 | reg_request.set_id(2000); 39 | reg_request.set_name("rpc"); 40 | reg_request.set_password("123456"); 41 | ik::RegisterResponse reg_response; 42 | 43 | RpcControl control; 44 | 45 | stub.Register(&control,®_request,®_response,nullptr); 46 | 47 | //rpc调用完成,读调用的结果 48 | if (reg_response.error().error() == 0) 49 | { 50 | //没错误 51 | cout << "rpc login response: " << reg_response.success() << endl; 52 | } 53 | else 54 | { 55 | //有错误 56 | cout << "rpc login response errer: " << reg_response.error().error_msg() << endl; 57 | } 58 | 59 | 60 | return 0; 61 | } -------------------------------------------------------------------------------- /example/proto/User.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ik; 4 | 5 | option cc_generic_services = true; 6 | 7 | message ErrorMsg 8 | { 9 | int32 error = 1; 10 | bytes error_msg = 2; 11 | } 12 | 13 | message LoginRequest 14 | { 15 | bytes name = 1; 16 | bytes password = 2; 17 | } 18 | 19 | message LoginResponse 20 | { 21 | ErrorMsg errmsg = 1; 22 | bool success = 2; 23 | } 24 | 25 | service UserServiceRpc 26 | { 27 | rpc Login(LoginRequest) returns(LoginResponse); 28 | rpc Register(RegisterRequest) returns(RegisterResponse); 29 | } 30 | 31 | message RegisterRequest 32 | { 33 | uint32 id = 1; 34 | bytes name = 2; 35 | bytes password = 3; 36 | } 37 | 38 | message RegisterResponse 39 | { 40 | ErrorMsg error = 1; 41 | bool success = 2; 42 | } -------------------------------------------------------------------------------- /example/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. SRC_LIST) 2 | -------------------------------------------------------------------------------- /lib/include/LoggerQueue.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | //异步写日志的日志队列 11 | template 12 | class LoggerQueue 13 | { 14 | public: 15 | void push(const T &data) 16 | { 17 | lock_guard lock(mutex_); 18 | queue_.push(data); 19 | condition_.notify_one(); 20 | } 21 | 22 | T pop() 23 | { 24 | unique_lock lock(mutex_); 25 | while (queue_.empty()) 26 | { 27 | //日志队列为空,线程进入wait 28 | condition_.wait(lock); 29 | } 30 | T ret = queue_.front(); 31 | queue_.pop(); 32 | return ret; 33 | } 34 | 35 | private: 36 | queue queue_; 37 | mutex mutex_; 38 | condition_variable condition_; 39 | }; -------------------------------------------------------------------------------- /lib/include/RpcApplication.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "RpcConfigure.hpp" 4 | 5 | //Rpc框架的基础类(单例) 6 | class RpcApplication 7 | { 8 | public: 9 | static void init(int argc, char **argv); 10 | 11 | static RpcApplication &get_instance() 12 | { 13 | static RpcApplication instance; 14 | return instance; 15 | } 16 | 17 | static RpcConfigure &get_configure() { return configure_; } 18 | 19 | private: 20 | RpcApplication(); 21 | ~RpcApplication() {} 22 | 23 | private: 24 | RpcApplication(RpcApplication &) = delete; 25 | RpcApplication(RpcApplication &&) = delete; 26 | 27 | private: 28 | static RpcConfigure configure_; 29 | }; -------------------------------------------------------------------------------- /lib/include/RpcChannel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class RpcChannel : public google::protobuf::RpcChannel 9 | { 10 | public: 11 | //所有通过stub代理对象调用的rpc方法,都走到这里了,统一做rpc方法调用的数据序列化和网络发送 12 | void CallMethod(const google::protobuf::MethodDescriptor *method, 13 | google::protobuf::RpcController *controller, 14 | const google::protobuf::Message *request, 15 | google::protobuf::Message *response, 16 | google::protobuf::Closure *done); 17 | }; -------------------------------------------------------------------------------- /lib/include/RpcConfigure.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | /* 7 | * 框架读取配置文件类 8 | * rpcserver:ip rpcserver:port 9 | * zookeeper:ip zookeeper:port 10 | */ 11 | class RpcConfigure 12 | { 13 | public: 14 | //加载配置文件 15 | void load_configure(const char *config_file); 16 | 17 | //查询配置项信息 18 | string find_load(string key); 19 | 20 | //去掉字符串前后的空格 21 | void trim(string &str_buf); 22 | 23 | private: 24 | unordered_map configure_map_; 25 | }; -------------------------------------------------------------------------------- /lib/include/RpcControl.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | class RpcControl : public google::protobuf::RpcController 8 | { 9 | public: 10 | RpcControl(); 11 | 12 | void Reset(); 13 | 14 | bool Failed() const; 15 | 16 | string ErrorText() const; 17 | 18 | void SetFailed(const string &reason); 19 | 20 | public: 21 | //暂时不实现 22 | void StartCancel(); 23 | 24 | bool IsCanceled() const; 25 | 26 | void NotifyOnCancel(google::protobuf::Closure *callback); 27 | 28 | private: 29 | bool failed_; //Rpc方法执行过程中的状态 30 | string error_text; //Rpc方法执行过程中的错误信息 31 | }; -------------------------------------------------------------------------------- /lib/include/RpcHeader.pb.h: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: RpcHeader.proto 3 | 4 | #ifndef PROTOBUF_RpcHeader_2eproto__INCLUDED 5 | #define PROTOBUF_RpcHeader_2eproto__INCLUDED 6 | 7 | #include 8 | 9 | #include 10 | 11 | #if GOOGLE_PROTOBUF_VERSION < 3000000 12 | #error This file was generated by a newer version of protoc which is 13 | #error incompatible with your Protocol Buffer headers. Please update 14 | #error your headers. 15 | #endif 16 | #if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 17 | #error This file was generated by an older version of protoc which is 18 | #error incompatible with your Protocol Buffer headers. Please 19 | #error regenerate this file with a newer version of protoc. 20 | #endif 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | // @@protoc_insertion_point(includes) 31 | 32 | namespace ikrpc { 33 | 34 | // Internal implementation detail -- do not call these. 35 | void protobuf_AddDesc_RpcHeader_2eproto(); 36 | void protobuf_AssignDesc_RpcHeader_2eproto(); 37 | void protobuf_ShutdownFile_RpcHeader_2eproto(); 38 | 39 | class RpcHeader; 40 | 41 | // =================================================================== 42 | 43 | class RpcHeader : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:ikrpc.RpcHeader) */ { 44 | public: 45 | RpcHeader(); 46 | virtual ~RpcHeader(); 47 | 48 | RpcHeader(const RpcHeader& from); 49 | 50 | inline RpcHeader& operator=(const RpcHeader& from) { 51 | CopyFrom(from); 52 | return *this; 53 | } 54 | 55 | static const ::google::protobuf::Descriptor* descriptor(); 56 | static const RpcHeader& default_instance(); 57 | 58 | void Swap(RpcHeader* other); 59 | 60 | // implements Message ---------------------------------------------- 61 | 62 | inline RpcHeader* New() const { return New(NULL); } 63 | 64 | RpcHeader* New(::google::protobuf::Arena* arena) const; 65 | void CopyFrom(const ::google::protobuf::Message& from); 66 | void MergeFrom(const ::google::protobuf::Message& from); 67 | void CopyFrom(const RpcHeader& from); 68 | void MergeFrom(const RpcHeader& from); 69 | void Clear(); 70 | bool IsInitialized() const; 71 | 72 | int ByteSize() const; 73 | bool MergePartialFromCodedStream( 74 | ::google::protobuf::io::CodedInputStream* input); 75 | void SerializeWithCachedSizes( 76 | ::google::protobuf::io::CodedOutputStream* output) const; 77 | ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( 78 | bool deterministic, ::google::protobuf::uint8* output) const; 79 | ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { 80 | return InternalSerializeWithCachedSizesToArray(false, output); 81 | } 82 | int GetCachedSize() const { return _cached_size_; } 83 | private: 84 | void SharedCtor(); 85 | void SharedDtor(); 86 | void SetCachedSize(int size) const; 87 | void InternalSwap(RpcHeader* other); 88 | private: 89 | inline ::google::protobuf::Arena* GetArenaNoVirtual() const { 90 | return _internal_metadata_.arena(); 91 | } 92 | inline void* MaybeArenaPtr() const { 93 | return _internal_metadata_.raw_arena_ptr(); 94 | } 95 | public: 96 | 97 | ::google::protobuf::Metadata GetMetadata() const; 98 | 99 | // nested types ---------------------------------------------------- 100 | 101 | // accessors ------------------------------------------------------- 102 | 103 | // optional bytes service_name = 1; 104 | void clear_service_name(); 105 | static const int kServiceNameFieldNumber = 1; 106 | const ::std::string& service_name() const; 107 | void set_service_name(const ::std::string& value); 108 | void set_service_name(const char* value); 109 | void set_service_name(const void* value, size_t size); 110 | ::std::string* mutable_service_name(); 111 | ::std::string* release_service_name(); 112 | void set_allocated_service_name(::std::string* service_name); 113 | 114 | // optional bytes method_name = 2; 115 | void clear_method_name(); 116 | static const int kMethodNameFieldNumber = 2; 117 | const ::std::string& method_name() const; 118 | void set_method_name(const ::std::string& value); 119 | void set_method_name(const char* value); 120 | void set_method_name(const void* value, size_t size); 121 | ::std::string* mutable_method_name(); 122 | ::std::string* release_method_name(); 123 | void set_allocated_method_name(::std::string* method_name); 124 | 125 | // optional uint32 args_size = 3; 126 | void clear_args_size(); 127 | static const int kArgsSizeFieldNumber = 3; 128 | ::google::protobuf::uint32 args_size() const; 129 | void set_args_size(::google::protobuf::uint32 value); 130 | 131 | // @@protoc_insertion_point(class_scope:ikrpc.RpcHeader) 132 | private: 133 | 134 | ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; 135 | bool _is_default_instance_; 136 | ::google::protobuf::internal::ArenaStringPtr service_name_; 137 | ::google::protobuf::internal::ArenaStringPtr method_name_; 138 | ::google::protobuf::uint32 args_size_; 139 | mutable int _cached_size_; 140 | friend void protobuf_AddDesc_RpcHeader_2eproto(); 141 | friend void protobuf_AssignDesc_RpcHeader_2eproto(); 142 | friend void protobuf_ShutdownFile_RpcHeader_2eproto(); 143 | 144 | void InitAsDefaultInstance(); 145 | static RpcHeader* default_instance_; 146 | }; 147 | // =================================================================== 148 | 149 | 150 | // =================================================================== 151 | 152 | #if !PROTOBUF_INLINE_NOT_IN_HEADERS 153 | // RpcHeader 154 | 155 | // optional bytes service_name = 1; 156 | inline void RpcHeader::clear_service_name() { 157 | service_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 158 | } 159 | inline const ::std::string& RpcHeader::service_name() const { 160 | // @@protoc_insertion_point(field_get:ikrpc.RpcHeader.service_name) 161 | return service_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 162 | } 163 | inline void RpcHeader::set_service_name(const ::std::string& value) { 164 | 165 | service_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); 166 | // @@protoc_insertion_point(field_set:ikrpc.RpcHeader.service_name) 167 | } 168 | inline void RpcHeader::set_service_name(const char* value) { 169 | 170 | service_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); 171 | // @@protoc_insertion_point(field_set_char:ikrpc.RpcHeader.service_name) 172 | } 173 | inline void RpcHeader::set_service_name(const void* value, size_t size) { 174 | 175 | service_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), 176 | ::std::string(reinterpret_cast(value), size)); 177 | // @@protoc_insertion_point(field_set_pointer:ikrpc.RpcHeader.service_name) 178 | } 179 | inline ::std::string* RpcHeader::mutable_service_name() { 180 | 181 | // @@protoc_insertion_point(field_mutable:ikrpc.RpcHeader.service_name) 182 | return service_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 183 | } 184 | inline ::std::string* RpcHeader::release_service_name() { 185 | // @@protoc_insertion_point(field_release:ikrpc.RpcHeader.service_name) 186 | 187 | return service_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 188 | } 189 | inline void RpcHeader::set_allocated_service_name(::std::string* service_name) { 190 | if (service_name != NULL) { 191 | 192 | } else { 193 | 194 | } 195 | service_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), service_name); 196 | // @@protoc_insertion_point(field_set_allocated:ikrpc.RpcHeader.service_name) 197 | } 198 | 199 | // optional bytes method_name = 2; 200 | inline void RpcHeader::clear_method_name() { 201 | method_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 202 | } 203 | inline const ::std::string& RpcHeader::method_name() const { 204 | // @@protoc_insertion_point(field_get:ikrpc.RpcHeader.method_name) 205 | return method_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 206 | } 207 | inline void RpcHeader::set_method_name(const ::std::string& value) { 208 | 209 | method_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); 210 | // @@protoc_insertion_point(field_set:ikrpc.RpcHeader.method_name) 211 | } 212 | inline void RpcHeader::set_method_name(const char* value) { 213 | 214 | method_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); 215 | // @@protoc_insertion_point(field_set_char:ikrpc.RpcHeader.method_name) 216 | } 217 | inline void RpcHeader::set_method_name(const void* value, size_t size) { 218 | 219 | method_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), 220 | ::std::string(reinterpret_cast(value), size)); 221 | // @@protoc_insertion_point(field_set_pointer:ikrpc.RpcHeader.method_name) 222 | } 223 | inline ::std::string* RpcHeader::mutable_method_name() { 224 | 225 | // @@protoc_insertion_point(field_mutable:ikrpc.RpcHeader.method_name) 226 | return method_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 227 | } 228 | inline ::std::string* RpcHeader::release_method_name() { 229 | // @@protoc_insertion_point(field_release:ikrpc.RpcHeader.method_name) 230 | 231 | return method_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 232 | } 233 | inline void RpcHeader::set_allocated_method_name(::std::string* method_name) { 234 | if (method_name != NULL) { 235 | 236 | } else { 237 | 238 | } 239 | method_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), method_name); 240 | // @@protoc_insertion_point(field_set_allocated:ikrpc.RpcHeader.method_name) 241 | } 242 | 243 | // optional uint32 args_size = 3; 244 | inline void RpcHeader::clear_args_size() { 245 | args_size_ = 0u; 246 | } 247 | inline ::google::protobuf::uint32 RpcHeader::args_size() const { 248 | // @@protoc_insertion_point(field_get:ikrpc.RpcHeader.args_size) 249 | return args_size_; 250 | } 251 | inline void RpcHeader::set_args_size(::google::protobuf::uint32 value) { 252 | 253 | args_size_ = value; 254 | // @@protoc_insertion_point(field_set:ikrpc.RpcHeader.args_size) 255 | } 256 | 257 | #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS 258 | 259 | // @@protoc_insertion_point(namespace_scope) 260 | 261 | } // namespace ikrpc 262 | 263 | // @@protoc_insertion_point(global_scope) 264 | 265 | #endif // PROTOBUF_RpcHeader_2eproto__INCLUDED 266 | -------------------------------------------------------------------------------- /lib/include/RpcLogger.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "LoggerQueue.hpp" 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | #define STR_SIZE 1024 10 | 11 | /* 12 | * 宏函数 13 | * 1.先获取单例对象 14 | * 2.组织参数 15 | * 3.写入日志文件 16 | */ 17 | #define RPC_LOG_INFO(logmsgformat, ...) \ 18 | do \ 19 | { \ 20 | RpcLogger &logger = RpcLogger::get_instance(); \ 21 | char str[STR_SIZE] = {0}; \ 22 | snprintf(str, STR_SIZE, logmsgformat, ##__VA_ARGS__); \ 23 | logger.log_info(str); \ 24 | } while (0); 25 | 26 | #define RPC_LOG_ERROR(logmsgformat, ...) \ 27 | do \ 28 | { \ 29 | RpcLogger &logger = RpcLogger::get_instance(); \ 30 | char str[STR_SIZE] = {0}; \ 31 | snprintf(str, STR_SIZE, logmsgformat, ##__VA_ARGS__); \ 32 | logger.log_error(str); \ 33 | } while (0); 34 | 35 | #define RPC_LOG_FATAL(logmsgformat, ...) \ 36 | do \ 37 | { \ 38 | RpcLogger &logger = RpcLogger::get_instance(); \ 39 | char str[STR_SIZE] = {0}; \ 40 | snprintf(str, STR_SIZE, logmsgformat, ##__VA_ARGS__); \ 41 | logger.log_fatal(str); \ 42 | } while (0); 43 | 44 | enum LogLevel 45 | { 46 | INFO, //普通信息 47 | ERROR, //错误信息 48 | FATAL, //毁灭信息 49 | }; 50 | 51 | //日志系统 52 | class RpcLogger 53 | { 54 | public: 55 | void log_info(string msg); 56 | void log_error(string msg); 57 | void log_fatal(string msg); 58 | 59 | static RpcLogger &get_instance() 60 | { 61 | static RpcLogger instance; 62 | return instance; 63 | } 64 | 65 | private: 66 | //设置日志级别 67 | void set_level(LogLevel level); 68 | 69 | //写日志 70 | void log(string msg); 71 | 72 | private: 73 | RpcLogger(); 74 | RpcLogger(const RpcLogger &) = delete; 75 | RpcLogger(RpcLogger &&) = delete; 76 | RpcLogger &operator=(const RpcLogger &) = delete; 77 | 78 | private: 79 | int log_level_; 80 | LoggerQueue log_queue_; //日志缓冲队列 81 | }; -------------------------------------------------------------------------------- /lib/include/RpcProvider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace muduo::net; 16 | using namespace muduo; 17 | using namespace std; 18 | 19 | //框架提供的专门负责发布rpc服务的网络框架类 20 | class RpcProvider 21 | { 22 | public: 23 | //框架提供给外部使用的,可以发布rpc方法的函数接口 24 | void notify_service(google::protobuf::Service *service); 25 | 26 | //启动rpc服务节点,开始提供rpc远程网络调用服务 27 | void run(); 28 | 29 | private: 30 | //新socket连接的回调 31 | void on_connection(const TcpConnectionPtr &conn); 32 | 33 | //已建立连接的读写事件回调 34 | void on_message(const TcpConnectionPtr &conn, Buffer *buffer, Timestamp stamp); 35 | 36 | //Clouser的回调操作,用于序列化rpc的响应和网络发送 37 | void send_rpc_response(const TcpConnectionPtr &conn,google::protobuf::Message* reponse); 38 | 39 | private: 40 | //服务类型信息 41 | struct ServiceInfo 42 | { 43 | //保存服务对象 44 | google::protobuf::Service *service_; 45 | //保存服务方法: <服务名,指向方法指针> 46 | unordered_map method_map_; 47 | }; 48 | 49 | private: 50 | /*unique_ptr serverPtr_;*/ 51 | EventLoop eventloop_; 52 | //存储服务信息 53 | unordered_map service_map_; 54 | }; -------------------------------------------------------------------------------- /lib/include/ZookeeperClient.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | class ZookeeperClient 10 | { 11 | public: 12 | ZookeeperClient(); 13 | ~ZookeeperClient(); 14 | 15 | //启动连接--》zkserver 16 | void start(); 17 | //在zkserver 根据指定的path创建znode节点 18 | void create(const char *path, const char *data, int datalen, int state = 0); 19 | //根据参数指定的znode节点路径,获取znode节点的值 20 | string get_data(const char *path); 21 | 22 | private: 23 | //zk的客户端句柄 24 | zhandle_t *zhandle_; 25 | }; -------------------------------------------------------------------------------- /lib/librpc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/lib/librpc.a -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | aux_source_directory(. SRC_LIST) 2 | 3 | add_library(rpc ${SRC_LIST}) 4 | 5 | target_link_libraries(rpc pthread muduo_base muduo_net zookeeper_mt) -------------------------------------------------------------------------------- /src/RpcApplication.cpp: -------------------------------------------------------------------------------- 1 | #include "RpcApplication.hpp" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace muduo; 9 | using namespace std; 10 | 11 | RpcConfigure RpcApplication::configure_; 12 | 13 | void RpcApplication::init(int argc, char **argv) 14 | { 15 | if (argc < 2) 16 | { 17 | LOG_FATAL << "format: command -i "; 18 | } 19 | 20 | int choose = 0; 21 | string config_file; 22 | while ((choose = getopt(argc, argv, "i:")) != -1) 23 | { 24 | switch (choose) 25 | { 26 | case 'i': 27 | config_file = optarg; 28 | break; 29 | case '?': 30 | LOG_FATAL << " format: command -i "; 31 | break; 32 | case ':': 33 | LOG_FATAL << " format: command -i "; 34 | break; 35 | default: 36 | break; 37 | } 38 | } 39 | //加载配置文件 40 | configure_.load_configure(config_file.c_str()); 41 | } 42 | 43 | RpcApplication::RpcApplication() 44 | { 45 | } 46 | -------------------------------------------------------------------------------- /src/RpcChannel.cpp: -------------------------------------------------------------------------------- 1 | #include "RpcChannel.hpp" 2 | #include "RpcApplication.hpp" 3 | #include "RpcControl.hpp" 4 | #include "RpcHeader.pb.h" 5 | #include "RpcLogger.hpp" 6 | #include "ZookeeperClient.hpp" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace std; 16 | 17 | #define BUFF_SIZE 1024 18 | 19 | void RpcChannel::CallMethod(const google::protobuf::MethodDescriptor *method, 20 | google::protobuf::RpcController *controller, 21 | const google::protobuf::Message *request, 22 | google::protobuf::Message *response, 23 | google::protobuf::Closure *done) 24 | { 25 | const google::protobuf::ServiceDescriptor *service_des = method->service(); 26 | string service_name = service_des->name(); 27 | string method_name = method->name(); 28 | 29 | //获取参数的序列化字符串长度 args_size 30 | int args_size = 0; 31 | string args_str; 32 | if (request->SerializeToString(&args_str)) 33 | { 34 | args_size = args_str.size(); 35 | } 36 | else 37 | { 38 | controller->SetFailed("serialize request error!"); 39 | return; 40 | } 41 | 42 | //定义rpc的请求header 43 | ikrpc::RpcHeader rpc_header; 44 | rpc_header.set_service_name(service_name); 45 | rpc_header.set_method_name(method_name); 46 | rpc_header.set_args_size(args_size); 47 | 48 | uint32_t header_size = 0; 49 | string rpc_header_str; 50 | if (rpc_header.SerializeToString(&rpc_header_str)) 51 | { 52 | //序列化成功 53 | header_size = rpc_header_str.size(); 54 | } 55 | else 56 | { 57 | //序列化失败 58 | controller->SetFailed("serialize rpc_header error!"); 59 | return; 60 | } 61 | 62 | //组织待发送的rpc请求的字符串 63 | string send_rpc_str; 64 | send_rpc_str.insert(0, string((char *)&header_size, 4)); //header_size 65 | send_rpc_str += rpc_header_str; //rpc_header 66 | send_rpc_str += args_str; //args_str 67 | 68 | //使用tcp编程,完成rpc方法的远程调用 69 | int client_fd = socket(AF_INET, SOCK_STREAM, 0); 70 | if (client_fd == -1) 71 | { 72 | close(client_fd); 73 | RPC_LOG_FATAL("create socket error! errno:%d", errno); 74 | } 75 | 76 | //获取ip和port 77 | ZookeeperClient zk_client; 78 | zk_client.start(); 79 | string method_path = "/" + service_name + "/" + method_name; 80 | string host_data = zk_client.get_data(method_path.c_str()); 81 | if(host_data == "") 82 | { 83 | controller->SetFailed(method_path+" is not exist"); 84 | return; 85 | } 86 | int host_index = host_data.find(":"); 87 | if(host_index == -1) 88 | { 89 | controller->SetFailed(method_path+" address is invalid!"); 90 | return; 91 | } 92 | string ip = host_data.substr(0,host_index); 93 | uint16_t port = atoi(host_data.substr(host_index+1,host_data.size()-host_index).c_str()); 94 | 95 | struct sockaddr_in server_addr; 96 | server_addr.sin_family = AF_INET; 97 | server_addr.sin_port = htons(port); 98 | server_addr.sin_addr.s_addr = inet_addr(ip.c_str()); 99 | 100 | if (connect(client_fd, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) 101 | { 102 | close(client_fd); 103 | RPC_LOG_FATAL("connet error! errno: %d", errno); 104 | } 105 | 106 | // 发送rpc请求 107 | if (send(client_fd, send_rpc_str.c_str(), send_rpc_str.size(), 0) == -1) 108 | { 109 | controller->SetFailed("send error! errno: " + errno); 110 | close(client_fd); 111 | return; 112 | } 113 | 114 | //接受rpc请求 115 | char recv_buffer[BUFF_SIZE] = {0}; 116 | ssize_t recv_size = recv(client_fd, recv_buffer, BUFF_SIZE, 0); 117 | if (recv_size == -1) 118 | { 119 | controller->SetFailed("recv error! errno: " + errno); 120 | close(client_fd); 121 | return; 122 | } 123 | 124 | //反序列化响应数据 125 | //String 因为遇到\0会认为是字符串结束,所以用Array 126 | if (!response->ParseFromArray(recv_buffer, recv_size)) 127 | { 128 | string recv = recv_buffer; 129 | controller->SetFailed("parse error! response_str: " + recv); 130 | close(client_fd); 131 | return; 132 | } 133 | close(client_fd); 134 | } -------------------------------------------------------------------------------- /src/RpcConfigure.cpp: -------------------------------------------------------------------------------- 1 | #include "RpcConfigure.hpp" 2 | #include "RpcLogger.hpp" 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | #define BUFFER_SIZE 128 9 | 10 | //加载配置文件 11 | void RpcConfigure::load_configure(const char *config_file) 12 | { 13 | FILE *pf = fopen(config_file, "r"); 14 | if (pf == nullptr) 15 | { 16 | RPC_LOG_FATAL("%s is not exist!", config_file); 17 | } 18 | 19 | // 1.注释 2.正确的配置项 3.去掉开头多余的空格 20 | while (!feof(pf)) 21 | { 22 | char buf[BUFFER_SIZE] = {0}; 23 | fgets(buf, BUFFER_SIZE, pf); 24 | 25 | string str_buf(buf); 26 | 27 | trim(str_buf); 28 | 29 | //判断# 注释 或者空行 30 | if (str_buf[0] == '#' || str_buf[0] == '\n' || str_buf.empty()) 31 | { 32 | continue; 33 | } 34 | 35 | // 解析配置项 36 | int index = str_buf.find('='); 37 | if (index == -1) 38 | { 39 | RPC_LOG_ERROR("configure file illegal!"); 40 | continue; 41 | } 42 | 43 | string key = str_buf.substr(0, index); 44 | trim(key); 45 | 46 | string value = str_buf.substr(index + 1, str_buf.size() - index); 47 | //去除最后一个换行符'\n' 48 | value[value.size() - 1] = ' '; 49 | trim(value); 50 | 51 | configure_map_.insert({key, value}); 52 | } 53 | } 54 | 55 | //查询配置项信息 56 | string RpcConfigure::find_load(string key) 57 | { 58 | auto it = configure_map_.find(key); 59 | if (it == configure_map_.end()) 60 | { 61 | return ""; 62 | } 63 | return it->second; 64 | } 65 | 66 | //去掉字符串前后的空格 67 | void RpcConfigure::trim(string &str_buf) 68 | { 69 | //检查空格并去掉 70 | //找到第一个不为空格的字符 71 | int index = str_buf.find_first_not_of(' '); 72 | if (index != -1) 73 | { 74 | //说明前面有字符,截取字符 75 | str_buf = str_buf.substr(index, str_buf.size() - index); 76 | } 77 | //去掉字符串后面的空格,找到最后一个不为空格的字符 78 | index = str_buf.find_last_not_of(' '); 79 | if (index != -1) 80 | { 81 | //说明后面有空格,截取字符 82 | str_buf = str_buf.substr(0, index + 1); 83 | } 84 | } -------------------------------------------------------------------------------- /src/RpcControl.cpp: -------------------------------------------------------------------------------- 1 | #include "RpcControl.hpp" 2 | 3 | RpcControl::RpcControl() 4 | { 5 | failed_ = false; 6 | error_text = ""; 7 | } 8 | 9 | void RpcControl::Reset() 10 | { 11 | failed_ = false; 12 | error_text = ""; 13 | } 14 | 15 | bool RpcControl::Failed() const 16 | { 17 | return failed_; 18 | } 19 | 20 | string RpcControl::ErrorText() const 21 | { 22 | return error_text; 23 | } 24 | 25 | void RpcControl::SetFailed(const string &reason) 26 | { 27 | failed_ = true; 28 | error_text = reason; 29 | } 30 | 31 | //暂时不实现 32 | void RpcControl::StartCancel() {} 33 | 34 | bool RpcControl::IsCanceled() const { return false; } 35 | 36 | void RpcControl::NotifyOnCancel(google::protobuf::Closure *callback) {} -------------------------------------------------------------------------------- /src/RpcLogger.cpp: -------------------------------------------------------------------------------- 1 | #include "RpcLogger.hpp" 2 | #include 3 | #include 4 | 5 | #define FILENAME_SIZE 128 6 | #define TIME_BUFFER 128 7 | 8 | void RpcLogger::log_info(string msg) 9 | { 10 | set_level(INFO); 11 | log(msg); 12 | } 13 | void RpcLogger::log_error(string msg) 14 | { 15 | set_level(ERROR); 16 | log(msg); 17 | } 18 | void RpcLogger::log_fatal(string msg) 19 | { 20 | set_level(FATAL); 21 | log(msg); 22 | LOG_ERROR << "Force Majeure is being dealt with"; 23 | //sleep(10); 24 | LOG_ERROR << "Question has been record in log file, please restore system,bye"; 25 | exit(0); 26 | } 27 | 28 | //设置日志级别 29 | void RpcLogger::set_level(LogLevel level) 30 | { 31 | log_level_ = level; 32 | } 33 | 34 | //写日志 35 | void RpcLogger::log(string msg) 36 | { 37 | string begin_info; 38 | switch (log_level_) 39 | { 40 | case INFO: 41 | begin_info = "[INFO]: "; 42 | break; 43 | case ERROR: 44 | begin_info = "[ERROR]: "; 45 | break; 46 | case FATAL: 47 | begin_info = "[FATAL]: "; 48 | break; 49 | default: 50 | break; 51 | } 52 | begin_info += msg; 53 | log_queue_.push(begin_info); 54 | } 55 | 56 | // 启动写日志线程,负责写日志 57 | RpcLogger::RpcLogger() 58 | { 59 | thread wirte_thread([&]() { 60 | for (;;) 61 | { 62 | //获取当前日期,取日志信息,写入相应的日志文件当中 63 | time_t now = time(nullptr); 64 | tm *now_time = localtime(&now); 65 | 66 | char file_name[FILENAME_SIZE] = {0}; 67 | sprintf(file_name, "%d-%d-%d_log.txt", now_time->tm_year + 1900, now_time->tm_mon + 1, now_time->tm_mday); 68 | 69 | FILE *file_ptr = fopen(file_name, "a+"); 70 | if (file_ptr == nullptr) 71 | { 72 | //打印muduo错误日志 73 | LOG_ERROR << "logger file: " << file_name << " opne error"; 74 | } 75 | 76 | string msg; 77 | char time_buf[TIME_BUFFER] = {0}; 78 | sprintf(time_buf, "%2d:%2d:%2d=>", now_time->tm_hour, now_time->tm_min, now_time->tm_sec); 79 | msg = log_queue_.pop(); 80 | msg.insert(0, time_buf); 81 | msg += '\n'; 82 | fputs(msg.c_str(), file_ptr); 83 | 84 | fclose(file_ptr); 85 | } 86 | }); 87 | 88 | //设置分离线程 89 | wirte_thread.detach(); 90 | } -------------------------------------------------------------------------------- /src/RpcProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "RpcProvider.hpp" 2 | #include "RpcApplication.hpp" 3 | #include "RpcHeader.pb.h" 4 | #include "RpcLogger.hpp" 5 | #include "ZookeeperClient.hpp" 6 | 7 | using namespace std; 8 | using namespace placeholders; 9 | 10 | /* 11 | service_name => service 描述 12 | service* 记录服务对象 13 | method_name => 对于method发方法对象 14 | */ 15 | 16 | //框架提供给外部使用的,可以发布rpc方法的函数接口 17 | void RpcProvider::notify_service(google::protobuf::Service *service) 18 | { 19 | ServiceInfo service_info; 20 | //获取服务对象的描述信息 21 | const google::protobuf::ServiceDescriptor *service_desc = service->GetDescriptor(); 22 | 23 | //获取服务对象名字 24 | string service_name = service_desc->name(); 25 | //获取服务对象方法的数量 26 | int method_nums = service_desc->method_count(); 27 | 28 | //cout << "service name: " << service_name << endl; 29 | for (int i = 0; i < method_nums; ++i) 30 | { 31 | //获取服务对象指定下标的服务的描述 32 | const google::protobuf::MethodDescriptor *method_desc = service_desc->method(i); 33 | string method_name = method_desc->name(); 34 | //cout << "method name: " << method_name << endl; 35 | //插入信息 36 | service_info.method_map_.insert({method_name, method_desc}); 37 | } 38 | service_info.service_ = service; 39 | service_map_.insert({service_name, service_info}); 40 | } 41 | 42 | //启动rpc服务节点,开始提供rpc远程网络调用服务 43 | void RpcProvider::run() 44 | { 45 | //获取ip和port 46 | string ip = RpcApplication::get_instance().get_configure().find_load("rpcserver_ip"); 47 | uint16_t port = atoi(RpcApplication::get_instance().get_configure().find_load("rpcserver_port").c_str()); 48 | //cout << ip << ":" << port << endl; 49 | InetAddress address(ip, port); 50 | 51 | //创建tcpserver对象 52 | TcpServer server(&eventloop_, address, "RpcProvider"); 53 | //绑定链接回调和消息读写回调方法 54 | server.setConnectionCallback(bind(&RpcProvider::on_connection, this, _1)); 55 | server.setMessageCallback(bind(&RpcProvider::on_message, this, _1, _2, _3)); 56 | 57 | //设置muduo库的线程数量 58 | server.setThreadNum(4); 59 | 60 | //把当前rpc节点上要发布的服务全部注册到zk上面,让rpc client可以从zk上发现服务 61 | ZookeeperClient zk_client; 62 | zk_client.start(); 63 | 64 | //在配置中心中创建节点 65 | for (auto &sp : service_map_) 66 | { 67 | string service_path = "/" + sp.first; 68 | zk_client.create(service_path.c_str(), nullptr, 0); 69 | for (auto &mp : sp.second.method_map_) 70 | { 71 | string method_path = service_path + "/" + mp.first; 72 | char method_path_data[128] = {0}; 73 | sprintf(method_path_data, "%s:%d", ip.c_str(), port); 74 | //ZOO_EPHEMERAL 表示znode时候临时性节点 75 | zk_client.create(method_path.c_str(), method_path_data, strlen(method_path_data), ZOO_EPHEMERAL); 76 | } 77 | } 78 | 79 | RPC_LOG_INFO("server RpcProvider [ip: %s][port: %d]", ip.c_str(), port); 80 | //启动网络服务 81 | server.start(); 82 | eventloop_.loop(); 83 | } 84 | 85 | //新socket连接的回调 86 | void RpcProvider::on_connection(const TcpConnectionPtr &conn) 87 | { 88 | if (!conn->connected()) 89 | { 90 | //和rpc client断开连接 91 | conn->shutdown(); 92 | } 93 | } 94 | 95 | /* 96 | 在框架内部,RpcPrivoder和RpcConsumer协商好之间通信用的protobuf类型 97 | 标识长度:header_size = service_name + method_name + argc_size 98 | service_name ==> service 99 | method_name ==> method 100 | 定义proto的message类型: 101 | args 102 | 103 | recv_buf = header + args 104 | 16UserServiceLogin15zhang san123456 105 | 106 | --> header_size(4字节)+ header_str + args_str 107 | */ 108 | 109 | //已建立连接的读写事件回调 110 | void RpcProvider::on_message(const TcpConnectionPtr &conn, Buffer *buffer, Timestamp stamp) 111 | { 112 | // 网络上接受的远程rpc调用请求的字符流 113 | string recv_buf = buffer->retrieveAllAsString(); 114 | 115 | //从字符流中读取前四个字节的内容(利用int特性),即header的长度 116 | uint32_t header_size = 0; 117 | recv_buf.copy((char *)&header_size, 4, 0); 118 | 119 | RPC_LOG_INFO("header size: %d", header_size); 120 | 121 | //根据header_size读取数据头的原始字符流 122 | string rpc_header_str = recv_buf.substr(4, header_size); 123 | 124 | //反序列化 125 | ikrpc::RpcHeader rpc_header; 126 | string service_name; 127 | string method_name; 128 | uint32_t args_size = 0; 129 | if (rpc_header.ParseFromString(rpc_header_str)) 130 | { 131 | //数据头反序列化成功 132 | service_name = rpc_header.service_name(); 133 | method_name = rpc_header.method_name(); 134 | args_size = rpc_header.args_size(); 135 | } 136 | else 137 | { 138 | //数据头反序列化失败 139 | RPC_LOG_ERROR("rpc header str:%s parse error!", rpc_header_str.c_str()); 140 | return; 141 | } 142 | 143 | //解析参数 144 | string args_str = recv_buf.substr(4 + header_size, args_size); 145 | 146 | //打印调试信息 147 | RPC_LOG_INFO("<------------------------------------------------>"); 148 | RPC_LOG_INFO("rpc header str: %s", rpc_header_str.c_str()); 149 | RPC_LOG_INFO("service name: %s", service_name.c_str()); 150 | RPC_LOG_INFO("method name: %s", method_name.c_str()); 151 | RPC_LOG_INFO("args: %s", args_str.c_str()); 152 | RPC_LOG_INFO("<------------------------------------------------>"); 153 | 154 | //获取service对象和method对象 155 | auto service_it = service_map_.find(service_name); 156 | if (service_it == service_map_.end()) 157 | { 158 | RPC_LOG_ERROR("%s is not exist", service_name.c_str()); 159 | return; 160 | } 161 | 162 | auto method_it = service_it->second.method_map_.find(method_name); 163 | if (method_it == service_it->second.method_map_.end()) 164 | { 165 | RPC_LOG_ERROR("%s::%s is not exist", service_name.c_str(), method_name.c_str()); 166 | return; 167 | } 168 | 169 | //获取service和method对象 170 | google::protobuf::Service *service = service_it->second.service_; 171 | const google::protobuf::MethodDescriptor *method = method_it->second; 172 | 173 | //生成rpc方法调用的请求request 和响应response参数 174 | google::protobuf::Message *request = service->GetRequestPrototype(method).New(); 175 | if (!request->ParseFromString(args_str)) 176 | { 177 | RPC_LOG_ERROR("request parse error!"); 178 | return; 179 | } 180 | google::protobuf::Message *response = service->GetResponsePrototype(method).New(); 181 | 182 | //给callMethod方法的调用,绑定一个closure回调函数 183 | google::protobuf::Closure *done = google::protobuf::NewCallback(this, &RpcProvider::send_rpc_response, conn, response); 184 | 185 | //在框架上根据远端rpc请求,调用响应方法 186 | service->CallMethod(method, nullptr, request, response, done); 187 | } 188 | 189 | //Clouser的回调操作,用于序列化rpc的响应和网络发送,即序列化response 190 | void RpcProvider::send_rpc_response(const TcpConnectionPtr &conn, google::protobuf::Message *response) 191 | { 192 | string response_str; 193 | //序列化 194 | if (response->SerializeToString(&response_str)) 195 | { 196 | //发送序列化的数据 197 | conn->send(response_str); 198 | } 199 | else 200 | { 201 | //序列化失败 202 | RPC_LOG_ERROR("serialize reponse error"); 203 | } 204 | //短链接 205 | conn->shutdown(); 206 | } -------------------------------------------------------------------------------- /src/ZookeeperClient.cpp: -------------------------------------------------------------------------------- 1 | #include "ZookeeperClient.hpp" 2 | #include "RpcApplication.hpp" 3 | #include "RpcLogger.hpp" 4 | #include 5 | 6 | using namespace std; 7 | 8 | void global_watcher(zhandle_t *handler, int type, int state, const char *path, void *wathcer_context) 9 | { 10 | if (type == ZOO_SESSION_EVENT) //回调的消息类型 11 | { 12 | //连接成功就会发送一个成功信号 13 | if (state == ZOO_CONNECTED_STATE) //zkclient 和 zkserver 连接成功 14 | { 15 | //获取信号量 16 | sem_t *sem = (sem_t *)zoo_get_context(handler); 17 | sem_post(sem); 18 | } 19 | } 20 | } 21 | 22 | ZookeeperClient::ZookeeperClient() : zhandle_(nullptr) 23 | { 24 | } 25 | ZookeeperClient::~ZookeeperClient() 26 | { 27 | if (zhandle_ != nullptr) 28 | { 29 | zookeeper_close(zhandle_); //关闭句柄,释放资源 30 | } 31 | } 32 | 33 | //启动连接--》zkserver 34 | // 因为是异步,所以需要同步 35 | void ZookeeperClient::start() 36 | { 37 | string host = RpcApplication::get_instance().get_configure().find_load("zookeeper_ip"); 38 | string port = RpcApplication::get_instance().get_configure().find_load("zookeeper_port"); 39 | string con_str = host + ":" + port; 40 | cout << con_str << endl; 41 | zhandle_ = zookeeper_init(con_str.c_str(), global_watcher, 30000, nullptr, nullptr, 0); 42 | if (zhandle_ == nullptr) 43 | { 44 | RPC_LOG_FATAL("zookeeper init error"); 45 | } 46 | 47 | sem_t sem; 48 | sem_init(&sem, 0, 0); 49 | zoo_set_context(zhandle_, &sem); //设置信号量s 50 | 51 | sem_wait(&sem); 52 | RPC_LOG_INFO("zookeeper init success"); 53 | } 54 | 55 | //在zkserver 根据指定的path创建znode节点 56 | void ZookeeperClient::create(const char *path, const char *data, int datalen, int state) 57 | { 58 | char path_buffer[128] = {0}; 59 | int buffer_len = sizeof(path_buffer); 60 | int flag; 61 | 62 | //同步检查path是否存在 63 | flag = zoo_exists(zhandle_, path, 0, nullptr); 64 | if (ZNONODE == flag) //不存在 65 | { 66 | flag = zoo_create(zhandle_, path, data, datalen, &ZOO_OPEN_ACL_UNSAFE, state, path_buffer, buffer_len); 67 | if (flag == ZOK) //成功 68 | { 69 | RPC_LOG_INFO("znode create success...path: %s", path); 70 | } 71 | else 72 | { 73 | RPC_LOG_FATAL("falg: %d, znode create error... path: %s", flag, path); 74 | } 75 | } 76 | } 77 | //根据参数指定的znode节点路径,获取znode节点的值 78 | string ZookeeperClient::get_data(const char *path) 79 | { 80 | //buffer存储返回结果 81 | char buffer[64] = {0}; 82 | int buffer_len = sizeof(buffer); 83 | int flag = zoo_get(zhandle_, path, 0, buffer, &buffer_len, nullptr); 84 | if (flag != ZOK) 85 | { 86 | RPC_LOG_ERROR("can't get znode... path: %s", path); 87 | return ""; 88 | } 89 | else 90 | { 91 | return buffer; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/include/LoggerQueue.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | //异步写日志的日志队列 11 | template 12 | class LoggerQueue 13 | { 14 | public: 15 | void push(const T &data) 16 | { 17 | lock_guard lock(mutex_); 18 | queue_.push(data); 19 | condition_.notify_one(); 20 | } 21 | 22 | T pop() 23 | { 24 | unique_lock lock(mutex_); 25 | while (queue_.empty()) 26 | { 27 | //日志队列为空,线程进入wait 28 | condition_.wait(lock); 29 | } 30 | T ret = queue_.front(); 31 | queue_.pop(); 32 | return ret; 33 | } 34 | 35 | private: 36 | queue queue_; 37 | mutex mutex_; 38 | condition_variable condition_; 39 | }; -------------------------------------------------------------------------------- /src/include/RpcApplication.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "RpcConfigure.hpp" 4 | 5 | //Rpc框架的基础类(单例) 6 | class RpcApplication 7 | { 8 | public: 9 | static void init(int argc, char **argv); 10 | 11 | static RpcApplication &get_instance() 12 | { 13 | static RpcApplication instance; 14 | return instance; 15 | } 16 | 17 | static RpcConfigure &get_configure() { return configure_; } 18 | 19 | private: 20 | RpcApplication(); 21 | ~RpcApplication() {} 22 | 23 | private: 24 | RpcApplication(RpcApplication &) = delete; 25 | RpcApplication(RpcApplication &&) = delete; 26 | 27 | private: 28 | static RpcConfigure configure_; 29 | }; -------------------------------------------------------------------------------- /src/include/RpcChannel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class RpcChannel : public google::protobuf::RpcChannel 9 | { 10 | public: 11 | //所有通过stub代理对象调用的rpc方法,都走到这里了,统一做rpc方法调用的数据序列化和网络发送 12 | void CallMethod(const google::protobuf::MethodDescriptor *method, 13 | google::protobuf::RpcController *controller, 14 | const google::protobuf::Message *request, 15 | google::protobuf::Message *response, 16 | google::protobuf::Closure *done); 17 | }; -------------------------------------------------------------------------------- /src/include/RpcConfigure.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | /* 7 | * 框架读取配置文件类 8 | * rpcserver:ip rpcserver:port 9 | * zookeeper:ip zookeeper:port 10 | */ 11 | class RpcConfigure 12 | { 13 | public: 14 | //加载配置文件 15 | void load_configure(const char *config_file); 16 | 17 | //查询配置项信息 18 | string find_load(string key); 19 | 20 | //去掉字符串前后的空格 21 | void trim(string &str_buf); 22 | 23 | private: 24 | unordered_map configure_map_; 25 | }; -------------------------------------------------------------------------------- /src/include/RpcControl.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | class RpcControl : public google::protobuf::RpcController 8 | { 9 | public: 10 | RpcControl(); 11 | 12 | void Reset(); 13 | 14 | bool Failed() const; 15 | 16 | string ErrorText() const; 17 | 18 | void SetFailed(const string &reason); 19 | 20 | public: 21 | //暂时不实现 22 | void StartCancel(); 23 | 24 | bool IsCanceled() const; 25 | 26 | void NotifyOnCancel(google::protobuf::Closure *callback); 27 | 28 | private: 29 | bool failed_; //Rpc方法执行过程中的状态 30 | string error_text; //Rpc方法执行过程中的错误信息 31 | }; -------------------------------------------------------------------------------- /src/include/RpcHeader.pb.h: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: RpcHeader.proto 3 | 4 | #ifndef PROTOBUF_RpcHeader_2eproto__INCLUDED 5 | #define PROTOBUF_RpcHeader_2eproto__INCLUDED 6 | 7 | #include 8 | 9 | #include 10 | 11 | #if GOOGLE_PROTOBUF_VERSION < 3000000 12 | #error This file was generated by a newer version of protoc which is 13 | #error incompatible with your Protocol Buffer headers. Please update 14 | #error your headers. 15 | #endif 16 | #if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 17 | #error This file was generated by an older version of protoc which is 18 | #error incompatible with your Protocol Buffer headers. Please 19 | #error regenerate this file with a newer version of protoc. 20 | #endif 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | // @@protoc_insertion_point(includes) 31 | 32 | namespace ikrpc { 33 | 34 | // Internal implementation detail -- do not call these. 35 | void protobuf_AddDesc_RpcHeader_2eproto(); 36 | void protobuf_AssignDesc_RpcHeader_2eproto(); 37 | void protobuf_ShutdownFile_RpcHeader_2eproto(); 38 | 39 | class RpcHeader; 40 | 41 | // =================================================================== 42 | 43 | class RpcHeader : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:ikrpc.RpcHeader) */ { 44 | public: 45 | RpcHeader(); 46 | virtual ~RpcHeader(); 47 | 48 | RpcHeader(const RpcHeader& from); 49 | 50 | inline RpcHeader& operator=(const RpcHeader& from) { 51 | CopyFrom(from); 52 | return *this; 53 | } 54 | 55 | static const ::google::protobuf::Descriptor* descriptor(); 56 | static const RpcHeader& default_instance(); 57 | 58 | void Swap(RpcHeader* other); 59 | 60 | // implements Message ---------------------------------------------- 61 | 62 | inline RpcHeader* New() const { return New(NULL); } 63 | 64 | RpcHeader* New(::google::protobuf::Arena* arena) const; 65 | void CopyFrom(const ::google::protobuf::Message& from); 66 | void MergeFrom(const ::google::protobuf::Message& from); 67 | void CopyFrom(const RpcHeader& from); 68 | void MergeFrom(const RpcHeader& from); 69 | void Clear(); 70 | bool IsInitialized() const; 71 | 72 | int ByteSize() const; 73 | bool MergePartialFromCodedStream( 74 | ::google::protobuf::io::CodedInputStream* input); 75 | void SerializeWithCachedSizes( 76 | ::google::protobuf::io::CodedOutputStream* output) const; 77 | ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( 78 | bool deterministic, ::google::protobuf::uint8* output) const; 79 | ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { 80 | return InternalSerializeWithCachedSizesToArray(false, output); 81 | } 82 | int GetCachedSize() const { return _cached_size_; } 83 | private: 84 | void SharedCtor(); 85 | void SharedDtor(); 86 | void SetCachedSize(int size) const; 87 | void InternalSwap(RpcHeader* other); 88 | private: 89 | inline ::google::protobuf::Arena* GetArenaNoVirtual() const { 90 | return _internal_metadata_.arena(); 91 | } 92 | inline void* MaybeArenaPtr() const { 93 | return _internal_metadata_.raw_arena_ptr(); 94 | } 95 | public: 96 | 97 | ::google::protobuf::Metadata GetMetadata() const; 98 | 99 | // nested types ---------------------------------------------------- 100 | 101 | // accessors ------------------------------------------------------- 102 | 103 | // optional bytes service_name = 1; 104 | void clear_service_name(); 105 | static const int kServiceNameFieldNumber = 1; 106 | const ::std::string& service_name() const; 107 | void set_service_name(const ::std::string& value); 108 | void set_service_name(const char* value); 109 | void set_service_name(const void* value, size_t size); 110 | ::std::string* mutable_service_name(); 111 | ::std::string* release_service_name(); 112 | void set_allocated_service_name(::std::string* service_name); 113 | 114 | // optional bytes method_name = 2; 115 | void clear_method_name(); 116 | static const int kMethodNameFieldNumber = 2; 117 | const ::std::string& method_name() const; 118 | void set_method_name(const ::std::string& value); 119 | void set_method_name(const char* value); 120 | void set_method_name(const void* value, size_t size); 121 | ::std::string* mutable_method_name(); 122 | ::std::string* release_method_name(); 123 | void set_allocated_method_name(::std::string* method_name); 124 | 125 | // optional uint32 args_size = 3; 126 | void clear_args_size(); 127 | static const int kArgsSizeFieldNumber = 3; 128 | ::google::protobuf::uint32 args_size() const; 129 | void set_args_size(::google::protobuf::uint32 value); 130 | 131 | // @@protoc_insertion_point(class_scope:ikrpc.RpcHeader) 132 | private: 133 | 134 | ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; 135 | bool _is_default_instance_; 136 | ::google::protobuf::internal::ArenaStringPtr service_name_; 137 | ::google::protobuf::internal::ArenaStringPtr method_name_; 138 | ::google::protobuf::uint32 args_size_; 139 | mutable int _cached_size_; 140 | friend void protobuf_AddDesc_RpcHeader_2eproto(); 141 | friend void protobuf_AssignDesc_RpcHeader_2eproto(); 142 | friend void protobuf_ShutdownFile_RpcHeader_2eproto(); 143 | 144 | void InitAsDefaultInstance(); 145 | static RpcHeader* default_instance_; 146 | }; 147 | // =================================================================== 148 | 149 | 150 | // =================================================================== 151 | 152 | #if !PROTOBUF_INLINE_NOT_IN_HEADERS 153 | // RpcHeader 154 | 155 | // optional bytes service_name = 1; 156 | inline void RpcHeader::clear_service_name() { 157 | service_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 158 | } 159 | inline const ::std::string& RpcHeader::service_name() const { 160 | // @@protoc_insertion_point(field_get:ikrpc.RpcHeader.service_name) 161 | return service_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 162 | } 163 | inline void RpcHeader::set_service_name(const ::std::string& value) { 164 | 165 | service_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); 166 | // @@protoc_insertion_point(field_set:ikrpc.RpcHeader.service_name) 167 | } 168 | inline void RpcHeader::set_service_name(const char* value) { 169 | 170 | service_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); 171 | // @@protoc_insertion_point(field_set_char:ikrpc.RpcHeader.service_name) 172 | } 173 | inline void RpcHeader::set_service_name(const void* value, size_t size) { 174 | 175 | service_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), 176 | ::std::string(reinterpret_cast(value), size)); 177 | // @@protoc_insertion_point(field_set_pointer:ikrpc.RpcHeader.service_name) 178 | } 179 | inline ::std::string* RpcHeader::mutable_service_name() { 180 | 181 | // @@protoc_insertion_point(field_mutable:ikrpc.RpcHeader.service_name) 182 | return service_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 183 | } 184 | inline ::std::string* RpcHeader::release_service_name() { 185 | // @@protoc_insertion_point(field_release:ikrpc.RpcHeader.service_name) 186 | 187 | return service_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 188 | } 189 | inline void RpcHeader::set_allocated_service_name(::std::string* service_name) { 190 | if (service_name != NULL) { 191 | 192 | } else { 193 | 194 | } 195 | service_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), service_name); 196 | // @@protoc_insertion_point(field_set_allocated:ikrpc.RpcHeader.service_name) 197 | } 198 | 199 | // optional bytes method_name = 2; 200 | inline void RpcHeader::clear_method_name() { 201 | method_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 202 | } 203 | inline const ::std::string& RpcHeader::method_name() const { 204 | // @@protoc_insertion_point(field_get:ikrpc.RpcHeader.method_name) 205 | return method_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 206 | } 207 | inline void RpcHeader::set_method_name(const ::std::string& value) { 208 | 209 | method_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); 210 | // @@protoc_insertion_point(field_set:ikrpc.RpcHeader.method_name) 211 | } 212 | inline void RpcHeader::set_method_name(const char* value) { 213 | 214 | method_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); 215 | // @@protoc_insertion_point(field_set_char:ikrpc.RpcHeader.method_name) 216 | } 217 | inline void RpcHeader::set_method_name(const void* value, size_t size) { 218 | 219 | method_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), 220 | ::std::string(reinterpret_cast(value), size)); 221 | // @@protoc_insertion_point(field_set_pointer:ikrpc.RpcHeader.method_name) 222 | } 223 | inline ::std::string* RpcHeader::mutable_method_name() { 224 | 225 | // @@protoc_insertion_point(field_mutable:ikrpc.RpcHeader.method_name) 226 | return method_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 227 | } 228 | inline ::std::string* RpcHeader::release_method_name() { 229 | // @@protoc_insertion_point(field_release:ikrpc.RpcHeader.method_name) 230 | 231 | return method_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 232 | } 233 | inline void RpcHeader::set_allocated_method_name(::std::string* method_name) { 234 | if (method_name != NULL) { 235 | 236 | } else { 237 | 238 | } 239 | method_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), method_name); 240 | // @@protoc_insertion_point(field_set_allocated:ikrpc.RpcHeader.method_name) 241 | } 242 | 243 | // optional uint32 args_size = 3; 244 | inline void RpcHeader::clear_args_size() { 245 | args_size_ = 0u; 246 | } 247 | inline ::google::protobuf::uint32 RpcHeader::args_size() const { 248 | // @@protoc_insertion_point(field_get:ikrpc.RpcHeader.args_size) 249 | return args_size_; 250 | } 251 | inline void RpcHeader::set_args_size(::google::protobuf::uint32 value) { 252 | 253 | args_size_ = value; 254 | // @@protoc_insertion_point(field_set:ikrpc.RpcHeader.args_size) 255 | } 256 | 257 | #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS 258 | 259 | // @@protoc_insertion_point(namespace_scope) 260 | 261 | } // namespace ikrpc 262 | 263 | // @@protoc_insertion_point(global_scope) 264 | 265 | #endif // PROTOBUF_RpcHeader_2eproto__INCLUDED 266 | -------------------------------------------------------------------------------- /src/include/RpcLogger.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "LoggerQueue.hpp" 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | #define STR_SIZE 1024 10 | 11 | /* 12 | * 宏函数 13 | * 1.先获取单例对象 14 | * 2.组织参数 15 | * 3.写入日志文件 16 | */ 17 | #define RPC_LOG_INFO(logmsgformat, ...) \ 18 | do \ 19 | { \ 20 | RpcLogger &logger = RpcLogger::get_instance(); \ 21 | char str[STR_SIZE] = {0}; \ 22 | snprintf(str, STR_SIZE, logmsgformat, ##__VA_ARGS__); \ 23 | logger.log_info(str); \ 24 | } while (0); 25 | 26 | #define RPC_LOG_ERROR(logmsgformat, ...) \ 27 | do \ 28 | { \ 29 | RpcLogger &logger = RpcLogger::get_instance(); \ 30 | char str[STR_SIZE] = {0}; \ 31 | snprintf(str, STR_SIZE, logmsgformat, ##__VA_ARGS__); \ 32 | logger.log_error(str); \ 33 | } while (0); 34 | 35 | #define RPC_LOG_FATAL(logmsgformat, ...) \ 36 | do \ 37 | { \ 38 | RpcLogger &logger = RpcLogger::get_instance(); \ 39 | char str[STR_SIZE] = {0}; \ 40 | snprintf(str, STR_SIZE, logmsgformat, ##__VA_ARGS__); \ 41 | logger.log_fatal(str); \ 42 | } while (0); 43 | 44 | enum LogLevel 45 | { 46 | INFO, //普通信息 47 | ERROR, //错误信息 48 | FATAL, //毁灭信息 49 | }; 50 | 51 | //日志系统 52 | class RpcLogger 53 | { 54 | public: 55 | void log_info(string msg); 56 | void log_error(string msg); 57 | void log_fatal(string msg); 58 | 59 | static RpcLogger &get_instance() 60 | { 61 | static RpcLogger instance; 62 | return instance; 63 | } 64 | 65 | private: 66 | //设置日志级别 67 | void set_level(LogLevel level); 68 | 69 | //写日志 70 | void log(string msg); 71 | 72 | private: 73 | RpcLogger(); 74 | RpcLogger(const RpcLogger &) = delete; 75 | RpcLogger(RpcLogger &&) = delete; 76 | RpcLogger &operator=(const RpcLogger &) = delete; 77 | 78 | private: 79 | int log_level_; 80 | LoggerQueue log_queue_; //日志缓冲队列 81 | }; -------------------------------------------------------------------------------- /src/include/RpcProvider.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace muduo::net; 16 | using namespace muduo; 17 | using namespace std; 18 | 19 | //框架提供的专门负责发布rpc服务的网络框架类 20 | class RpcProvider 21 | { 22 | public: 23 | //框架提供给外部使用的,可以发布rpc方法的函数接口 24 | void notify_service(google::protobuf::Service *service); 25 | 26 | //启动rpc服务节点,开始提供rpc远程网络调用服务 27 | void run(); 28 | 29 | private: 30 | //新socket连接的回调 31 | void on_connection(const TcpConnectionPtr &conn); 32 | 33 | //已建立连接的读写事件回调 34 | void on_message(const TcpConnectionPtr &conn, Buffer *buffer, Timestamp stamp); 35 | 36 | //Clouser的回调操作,用于序列化rpc的响应和网络发送 37 | void send_rpc_response(const TcpConnectionPtr &conn,google::protobuf::Message* reponse); 38 | 39 | private: 40 | //服务类型信息 41 | struct ServiceInfo 42 | { 43 | //保存服务对象 44 | google::protobuf::Service *service_; 45 | //保存服务方法: <服务名,指向方法指针> 46 | unordered_map method_map_; 47 | }; 48 | 49 | private: 50 | /*unique_ptr serverPtr_;*/ 51 | EventLoop eventloop_; 52 | //存储服务信息 53 | unordered_map service_map_; 54 | }; -------------------------------------------------------------------------------- /src/include/ZookeeperClient.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | class ZookeeperClient 10 | { 11 | public: 12 | ZookeeperClient(); 13 | ~ZookeeperClient(); 14 | 15 | //启动连接--》zkserver 16 | void start(); 17 | //在zkserver 根据指定的path创建znode节点 18 | void create(const char *path, const char *data, int datalen, int state = 0); 19 | //根据参数指定的znode节点路径,获取znode节点的值 20 | string get_data(const char *path); 21 | 22 | private: 23 | //zk的客户端句柄 24 | zhandle_t *zhandle_; 25 | }; -------------------------------------------------------------------------------- /src/proto/RpcHeader.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ikrpc; 4 | 5 | message RpcHeader 6 | { 7 | bytes service_name = 1; 8 | bytes method_name = 2; 9 | uint32 args_size = 3; 10 | } -------------------------------------------------------------------------------- /test/protobuf/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shenmingik/RPC/1935c4f0f9ad1ababcf895f717d44ed5301faf13/test/protobuf/main -------------------------------------------------------------------------------- /test/protobuf/main.cpp: -------------------------------------------------------------------------------- 1 | #include "test.pb.h" 2 | #include 3 | 4 | using namespace std; 5 | using namespace ik; 6 | 7 | int main() 8 | { 9 | LoginResponse login_rsp; 10 | ErrorMsg *error_msg = login_rsp.mutable_error(); 11 | error_msg->set_error(1); 12 | error_msg->set_error_msg("login error"); 13 | 14 | GetFriendListResponse friend_rsp; 15 | ErrorMsg *friend_msg = friend_rsp.mutable_error(); 16 | friend_msg->set_error(1); 17 | friend_msg->set_error_msg("get friend list error"); 18 | 19 | User *user1 = friend_rsp.add_friendlists(); 20 | user1->set_name("zhang san"); 21 | user1->set_age(20); 22 | user1->set_sex(User::man); 23 | 24 | cout << "has friends: " << friend_rsp.friendlists_size() << endl; 25 | } 26 | 27 | #if 0 28 | int main() 29 | { 30 | LoginRequest req; 31 | req.set_name("zhangsan"); 32 | req.set_password("123456"); 33 | 34 | //序列化 35 | string str_req; 36 | if(req.SerializeToString(&str_req)) 37 | { 38 | cout << "after serialize" << str_req << endl; 39 | } 40 | 41 | //反序列化 42 | LoginRequest new_req; 43 | if(!new_req.ParseFromString(str_req)) 44 | { 45 | cout<<"unserialize error!"< class User:public google::protobuf::Message 17 | message User 18 | { 19 | bytes name = 1; 20 | uint32 age = 2; 21 | 22 | enum Sex 23 | { 24 | man = 0; 25 | woman = 1; 26 | } 27 | Sex sex = 3; 28 | } 29 | 30 | // 登录请求消息类型 31 | message LoginRequest 32 | { 33 | string name = 1; //1表示是第一个字段 34 | string password = 2; 35 | } 36 | 37 | // 登录相应消息类型 38 | message LoginResponse 39 | { 40 | ErrorMsg error = 1; 41 | bool success = 2; 42 | } 43 | 44 | message GetFriendListRequest 45 | { 46 | uint32 userid = 1; 47 | } 48 | 49 | message GetFriendListResponse 50 | { 51 | ErrorMsg error = 1; 52 | repeated User friendlists = 2; 53 | } 54 | 55 | // ==>class UserServiceRpc:public: google::protobuf::Service 56 | service UserServiceRpc 57 | { 58 | rpc Login(LoginRequest) returns(LoginResponse); //login方法接受一个loginrequest的形参返回一个loginresponse的返回值 59 | rpc GetFriendList(GetFriendListRequest) returns(GetFriendListResponse); 60 | 61 | } -------------------------------------------------------------------------------- /test/protobuf/test2.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ik; 4 | 5 | // 在protobuf中定义描述rpc方法发类型-service 6 | message Map 7 | { 8 | map test = 3; 9 | } 10 | 11 | --------------------------------------------------------------------------------