]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: add Connection::get_peer_type()
authorKefu Chai <kchai@redhat.com>
Fri, 29 Jun 2018 11:51:31 +0000 (19:51 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 14 Jul 2018 07:34:23 +0000 (15:34 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/net/Connection.h
src/crimson/net/SocketConnection.h

index 963ccc655c925ac1c3c8f01ac49a107ed25db6eb..7248fdbe8ced932c6db27081f8ee8d7b52421333 100644 (file)
@@ -40,6 +40,7 @@ class Connection : public boost::intrusive_ref_counter<Connection> {
 
   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;
index 54e794627b5665ab2aad389b56a333cf991342b7..88df222ca8ea0092437c38a54b81be3d0403a605 100644 (file)
@@ -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;