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
a17c88b3
Unverified
Commit
a17c88b3
authored
Jun 25, 2018
by
Ge Jun
Committed by
GitHub
Jun 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #374 from kenshinxf/kenshinxf
Fix thrift doc method_name issue.
parents
8e156bee
8000e5fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
thrift.md
docs/cn/thrift.md
+1
-1
thrift.md
docs/en/thrift.md
+1
-1
No files found.
docs/cn/thrift.md
View file @
a17c88b3
...
@@ -95,7 +95,7 @@ public:
...
@@ -95,7 +95,7 @@ public:
example
::
EchoRequest
*
req
=
request
->
Cast
<
example
::
EchoRequest
>
();
example
::
EchoRequest
*
req
=
request
->
Cast
<
example
::
EchoRequest
>
();
example
::
EchoResponse
*
res
=
response
->
Cast
<
example
::
EchoResponse
>
();
example
::
EchoResponse
*
res
=
response
->
Cast
<
example
::
EchoResponse
>
();
// 通过
cntl->thrift_method_name()获得被访问的方法名
// 通过
request->method_name()获得被访问的方法名, 必须在Cast()被调用之后
if
(
_native_handler
)
{
if
(
_native_handler
)
{
_native_handler
->
Echo
(
*
res
,
*
req
);
_native_handler
->
Echo
(
*
res
,
*
req
);
}
else
{
}
else
{
...
...
docs/en/thrift.md
View file @
a17c88b3
...
@@ -95,7 +95,7 @@ public:
...
@@ -95,7 +95,7 @@ public:
example
::
EchoRequest
*
req
=
request
->
Cast
<
example
::
EchoRequest
>
();
example
::
EchoRequest
*
req
=
request
->
Cast
<
example
::
EchoRequest
>
();
example
::
EchoResponse
*
res
=
response
->
Cast
<
example
::
EchoResponse
>
();
example
::
EchoResponse
*
res
=
response
->
Cast
<
example
::
EchoResponse
>
();
// Get method-name for thrift via
cntl->thrift_method_name()
// Get method-name for thrift via
request->method_name() after Cast() was called
if
(
_native_handler
)
{
if
(
_native_handler
)
{
_native_handler
->
Echo
(
*
res
,
*
req
);
_native_handler
->
Echo
(
*
res
,
*
req
);
}
else
{
}
else
{
...
...
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