Skip to content

Commit

Permalink
所有mprpc代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoGangHe committed Jul 26, 2023
0 parents commit 12de66a
Show file tree
Hide file tree
Showing 1,725 changed files with 440,191 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"files.associations": {
"iostream": "cpp",
"string": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"chrono": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeinfo": "cpp",
"bitset": "cpp",
"complex": "cpp",
"list": "cpp",
"optional": "cpp",
"sstream": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"variant": "cpp"
}
}
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#设置cmake的最低版本和项目名字
cmake_minimum_required(VERSION 3.0)
project(mprpc)

#生成debug版本,可以进行gdb调试
set(CMAKE_BUILD_TYPE "Debug")

#设置项目可执行文件输出的路径
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

#设置项目库文件输出的路径
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#设置项目编译头文件搜索路径 -I
include_directories(${PROJECT_SOURCE_DIR}/src/include)
include_directories(${PROJECT_SOURCE_DIR}/example)
#设置项目库文件搜索路径 -L
link_directories(${PROJECT_SOURCE_DIR}/lib)

#src包含了mprpc框架所有的相关代码
add_subdirectory(src)
#example包含了mprpc框架使用的示例代码
add_subdirectory(example)
Empty file added README.md
Empty file.
Empty file added autobulid.sh
Empty file.
7 changes: 7 additions & 0 deletions bin/2023-7-25-log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

19:19:2 => first log message!
19:19:2 => /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
19:52:45 =>[error] first log message!
19:52:45 =>[error] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
19:52:45 =>[info] server_name:FriendServiceRpc
19:52:45 =>[info] method_name:GetFriendsList
28 changes: 28 additions & 0 deletions bin/2023-7-26-log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
15:40:54 =>[error] first log message!
15:40:54 =>[error] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
15:40:54 =>[info] server_name:FriendServiceRpc
15:40:54 =>[info] method_name:GetFriendsList
15:55:44 =>[error] first log message!
15:55:44 =>[info] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
15:55:44 =>[info] server_name:FriendServiceRpc
15:55:44 =>[info] method_name:GetFriendsList
15:56:53 =>[info] first log message!
15:56:53 =>[info] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
15:56:53 =>[info] service_name:FriendServiceRpc
15:56:53 =>[info] method_name:GetFriendsList
15:58:5 =>[error] first log message!
15:58:5 =>[error] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
15:58:5 =>[info] service_name:FriendServiceRpc
15:58:5 =>[info] method_name:GetFriendsList
15:58:42 =>[error] first log message!
15:58:42 =>[info] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
15:58:42 =>[info] service_name:FriendServiceRpc
15:58:42 =>[info] method_name:GetFriendsList
16:1:0 =>[error] first log message!
16:1:0 =>[error] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
16:1:0 =>[info] server_name:FriendServiceRpc
16:1:0 =>[info] method_name:GetFriendsList
16:2:25 =>[error] first log message!
16:2:25 =>[error] /home/xiaowei/mprpc/example/callee/friendservice.cc:main:42
16:2:25 =>[info] server_name:FriendServiceRpc
16:2:25 =>[info] method_name:GetFriendsList
Binary file added bin/consumer
Binary file not shown.
Binary file added bin/provider
Binary file not shown.
8 changes: 8 additions & 0 deletions bin/test.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#rpc节点的ip地址
rpcserverip=127.0.0.1
#rpc节点的port端口号
rpcserverport=8000
#zk的ip地址
zookeeperip=127.0.0.1
#zk的port端口号
zookeeperport=2181
1 change: 1 addition & 0 deletions build/.cmake/api/v1/query/client-vscode/query.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"requests":[{"kind":"cache","version":2},{"kind":"codemodel","version":2},{"kind":"toolchains","version":1},{"kind":"cmakeFiles","version":1}]}
Loading

0 comments on commit 12de66a

Please sign in to comment.