1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2014 Red Hat
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #ifndef CEPH_MSG_PIPECONNECTION_H
16 #define CEPH_MSG_PIPECONNECTION_H
18 #include "msg/Connection.h"
22 class PipeConnection : public Connection {
25 friend class boost::intrusive_ptr<PipeConnection>;
30 PipeConnection(CephContext *cct, Messenger *m)
34 ~PipeConnection() override;
38 bool try_get_pipe(Pipe** p);
40 bool clear_pipe(Pipe* old_p);
42 void reset_pipe(Pipe* p);
44 bool is_connected() override;
46 int send_message(Message *m) override;
47 void send_keepalive() override;
48 void mark_down() override;
49 void mark_disposable() override;
51 }; /* PipeConnection */
53 typedef boost::intrusive_ptr<PipeConnection> PipeConnectionRef;