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
b2fdd4d5
Commit
b2fdd4d5
authored
Aug 28, 2018
by
wangyao02
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-remove set_sock_opt from Controller
parent
7c06dae2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
controller.cpp
src/brpc/controller.cpp
+0
-10
controller.h
src/brpc/controller.h
+2
-2
No files found.
src/brpc/controller.cpp
View file @
b2fdd4d5
...
...
@@ -1392,16 +1392,6 @@ int Controller::get_sock_opt(int level, int optname, void* optval, socklen_t* op
}
}
int
Controller
::
set_sock_opt
(
int
level
,
int
optname
,
void
*
optval
,
socklen_t
optlen
)
{
Socket
*
s
=
_current_call
.
sending_sock
.
get
();
if
(
s
)
{
return
setsockopt
(
s
->
fd
(),
level
,
optname
,
optval
,
optlen
);
}
else
{
LOG
(
WARNING
)
<<
"sock is null"
;
return
EINVAL
;
}
}
#if defined(OS_MACOSX)
typedef
sig_t
SignalHandler
;
#else
...
...
src/brpc/controller.h
View file @
b2fdd4d5
...
...
@@ -592,9 +592,9 @@ private:
void
set_used_by_rpc
()
{
add_flag
(
FLAGS_USED_BY_RPC
);
}
bool
is_used_by_rpc
()
const
{
return
has_flag
(
FLAGS_USED_BY_RPC
);
}
// Get
/set
sock option. .e.g get vip info through ttm kernel module hook,
// Get sock option. .e.g get vip info through ttm kernel module hook,
int
get_sock_opt
(
int
level
,
int
optname
,
void
*
optval
,
socklen_t
*
optlen
);
int
set_sock_opt
(
int
level
,
int
optname
,
void
*
optval
,
socklen_t
optlen
);
private
:
// NOTE: align and group fields to make Controller as compact as possible.
...
...
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