forked from apache/brpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gejun
committed
Sep 2, 2017
1 parent
7124ac6
commit 8d4e0d8
Showing
44 changed files
with
572 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Baidu RPC - A framework to host and access services throughout Baidu. | ||
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved | ||
// | ||
// If you have any problem, contact us: | ||
// Baidu Hi : group 1296497 | ||
// Email : [email protected] | ||
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc | ||
// Copyright (c) 2014 baidu-rpc authors. | ||
// | ||
// 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. | ||
|
||
|
Oops, something went wrong.