chenBright commented on code in PR #2098:
URL: https://github.com/apache/brpc/pull/2098#discussion_r1090618329
##########
src/brpc/socket.cpp:
##########
@@ -579,6 +583,71 @@ int Socket::ResetFileDescriptor(int fd) {
}
}
+ do {
Review Comment:
done
##########
src/brpc/socket.h:
##########
@@ -198,6 +198,15 @@ struct SocketOptions {
std::shared_ptr<AppConnect> app_connect;
// The created socket will set parsing_context with this value.
Destroyable* initial_parsing_context;
+
+ // Enable TCP keepalive or not.
+ bool keepalive;
Review Comment:
done
##########
src/brpc/input_messenger.cpp:
##########
@@ -53,6 +53,18 @@ DEFINE_bool(log_connection_close, false,
"Print log when remote side closes the connection");
BRPC_VALIDATE_GFLAG(log_connection_close, PassValidate);
+DEFINE_bool(socket_keepalive, false,
+ "Enable keepalive of sockets if this value is true");
+
+DEFINE_int32(socket_keepidle_s, -1,
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]