You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "chenBright (via GitHub)" <gi...@apache.org> on 2023/01/30 13:20:42 UTC

[GitHub] [brpc] chenBright commented on a diff in pull request #2098: support TCP heartbeat of client

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: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org