Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
8d4e0d81
Commit
8d4e0d81
authored
Sep 02, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch svn r35203 r35204
parent
7124ac6f
Show whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
528 additions
and
264 deletions
+528
-264
client.cpp
example/asynchronous_echo_c++/client.cpp
+12
-6
server.cpp
example/asynchronous_echo_c++/server.cpp
+12
-6
client.cpp
example/backup_request_c++/client.cpp
+12
-6
server.cpp
example/backup_request_c++/server.cpp
+12
-6
client.cpp
example/cancel_c++/client.cpp
+12
-6
server.cpp
example/cancel_c++/server.cpp
+12
-6
client.cpp
example/cascade_echo_c++/client.cpp
+12
-6
server.cpp
example/cascade_echo_c++/server.cpp
+12
-6
client.cpp
example/dynamic_partition_echo_c++/client.cpp
+12
-6
server.cpp
example/dynamic_partition_echo_c++/server.cpp
+12
-6
client.cpp
example/echo_c++/client.cpp
+12
-6
server.cpp
example/echo_c++/server.cpp
+12
-6
client.cpp
example/echo_c++_hulu_pbrpc/client.cpp
+12
-6
server.cpp
example/echo_c++_hulu_pbrpc/server.cpp
+12
-6
client.cpp
example/echo_c++_sofa_pbrpc/client.cpp
+12
-6
server.cpp
example/echo_c++_sofa_pbrpc/server.cpp
+12
-6
client.cpp
example/echo_c++_ubrpc_compack/client.cpp
+12
-6
server.cpp
example/echo_c++_ubrpc_compack/server.cpp
+12
-6
benchmark_http.cpp
example/http_c++/benchmark_http.cpp
+12
-6
http_client.cpp
example/http_c++/http_client.cpp
+12
-6
http_server.cpp
example/http_c++/http_server.cpp
+12
-6
client.cpp
example/memcache_c++/client.cpp
+12
-6
client.cpp
example/multi_threaded_echo_c++/client.cpp
+12
-6
server.cpp
example/multi_threaded_echo_c++/server.cpp
+12
-6
client.cpp
example/multi_threaded_echo_fns_c++/client.cpp
+12
-6
server.cpp
example/multi_threaded_echo_fns_c++/server.cpp
+12
-6
client.cpp
example/multi_threaded_mcpack_c++/client.cpp
+12
-6
server.cpp
example/multi_threaded_mcpack_c++/server.cpp
+12
-6
client.cpp
example/nshead_extension_c++/client.cpp
+12
-6
server.cpp
example/nshead_extension_c++/server.cpp
+12
-6
client.cpp
example/nshead_pb_extension_c++/client.cpp
+12
-6
server.cpp
example/nshead_pb_extension_c++/server.cpp
+12
-6
client.cpp
example/parallel_echo_c++/client.cpp
+12
-6
server.cpp
example/parallel_echo_c++/server.cpp
+12
-6
client.cpp
example/partition_echo_c++/client.cpp
+12
-6
server.cpp
example/partition_echo_c++/server.cpp
+12
-6
redis_cli.cpp
example/redis_c++/redis_cli.cpp
+12
-6
redis_press.cpp
example/redis_c++/redis_press.cpp
+12
-6
client.cpp
example/selective_echo_c++/client.cpp
+12
-6
server.cpp
example/selective_echo_c++/server.cpp
+12
-6
client.cpp
example/session_data_and_thread_local/client.cpp
+12
-6
server.cpp
example/session_data_and_thread_local/server.cpp
+12
-6
client.cpp
example/streaming_echo_c++/client.cpp
+12
-6
server.cpp
example/streaming_echo_c++/server.cpp
+12
-6
No files found.
example/asynchronous_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server asynchronously every 1 second.
...
...
example/asynchronous_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/backup_request_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server every 1 second. If the response does
// not come back within FLAGS_backup_request_ms, it sends another request
...
...
example/backup_request_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server sleeping for even-th requests to trigger backup request of client.
...
...
example/cancel_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client to send 2 requests to server and accept the first returned response.
...
...
example/cancel_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/cascade_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server which will send the request to itself
// again according to the field `depth'
...
...
example/cascade_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <gflags/gflags.h>
#include <base/logging.h>
...
...
example/dynamic_partition_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server in parallel by multiple threads.
...
...
example/dynamic_partition_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server every 1 second.
...
...
example/echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/echo_c++_hulu_pbrpc/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server every 1 second.
...
...
example/echo_c++_hulu_pbrpc/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/echo_c++_sofa_pbrpc/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server every 1 second.
...
...
example/echo_c++_sofa_pbrpc/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/echo_c++_ubrpc_compack/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to ubrpc server every 1 second.
// This client can access the server in public/baidu-rpc-ub/example/echo_c++_compack_ubrpc as well.
...
...
example/echo_c++_ubrpc_compack/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive requests from ubrpc clients.
// This server can be accessed by the client in public/baidu-rpc-ub/example/echo_c++_compack_ubrpc as well.
...
...
example/http_c++/benchmark_http.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Benchmark http-server by multiple threads.
...
...
example/http_c++/http_client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// - Access pb services via HTTP
// ./http_client http://db-rpc-dev00.db01.baidu.com:8765/EchoService/Echo -d '{"message":"hello"}'
...
...
example/http_c++/http_server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive HttpRequest and send back HttpResponse.
...
...
example/memcache_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A multi-threaded client getting keys from a memcache server constantly.
...
...
example/multi_threaded_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server by multiple threads.
...
...
example/multi_threaded_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/multi_threaded_echo_fns_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to servers(discovered by naming service) by multiple threads.
...
...
example/multi_threaded_echo_fns_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/multi_threaded_mcpack_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server by multiple threads.
...
...
example/multi_threaded_mcpack_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/nshead_extension_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server every 1 second.
...
...
example/nshead_extension_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/nshead_pb_extension_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server every 1 second.
...
...
example/nshead_pb_extension_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/parallel_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server in parallel by multiple threads.
...
...
example/parallel_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/partition_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server in parallel by multiple threads.
...
...
example/partition_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/redis_c++/redis_cli.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A baidu-rpc based command-line interface to talk with redis-server
...
...
example/redis_c++/redis_press.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A multi-threaded client getting keys from a redis-server constantly.
...
...
example/selective_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server in parallel by multiple threads.
...
...
example/selective_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
example/session_data_and_thread_local/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server by multiple threads.
...
...
example/session_data_and_thread_local/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse asynchronously.
...
...
example/streaming_echo_c++/client.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A client sending requests to server in batch every 1 second.
...
...
example/streaming_echo_c++/server.cpp
View file @
8d4e0d81
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// If you have any problem, contact us:
// Baidu Hi : group 1296497
// Email : pbrpc@baidu.com
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive EchoRequest and send back EchoResponse.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment