From: Kefu Chai Date: Fri, 29 Jun 2018 11:51:31 +0000 (+0800) Subject: crimson/net: add Connection::get_peer_type() X-Git-Tag: v14.0.1~857^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e855e512f433ac408de6fbe3de34af894601182;p=ceph.git crimson/net: add Connection::get_peer_type() Signed-off-by: Kefu Chai --- diff --git a/src/crimson/net/Connection.h b/src/crimson/net/Connection.h index 963ccc655c92..7248fdbe8ced 100644 --- a/src/crimson/net/Connection.h +++ b/src/crimson/net/Connection.h @@ -40,6 +40,7 @@ class Connection : public boost::intrusive_ref_counter { const entity_addr_t& get_my_addr() const { return my_addr; } const entity_addr_t& get_peer_addr() const { return peer_addr; } + virtual int get_peer_type() const = 0; /// true if the handshake has completed and no errors have been encountered virtual bool is_connected() = 0; diff --git a/src/crimson/net/SocketConnection.h b/src/crimson/net/SocketConnection.h index 54e794627b56..88df222ca8ea 100644 --- a/src/crimson/net/SocketConnection.h +++ b/src/crimson/net/SocketConnection.h @@ -70,7 +70,7 @@ class SocketConnection : public Connection { seastar::future<> handle_keepalive2_ack(); bool require_auth_feature() const; - int get_peer_type() const { + int get_peer_type() const override { return h.connect.host_type; } uint32_t get_proto_version(entity_type_t peer_type, bool connec) const;