]> git.proxmox.com Git - ceph.git/blob - ceph/src/common/admin_socket_client.h
update sources to v12.1.0
[ceph.git] / ceph / src / common / admin_socket_client.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2011 New Dream Network
7 *
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.
12 *
13 */
14
15 #ifndef CEPH_COMMON_ADMIN_SOCKET_CLIENT_H
16 #define CEPH_COMMON_ADMIN_SOCKET_CLIENT_H
17
18 #include <string>
19
20 /* This is a simple client that talks to an AdminSocket using blocking I/O.
21 * We put a 5-second timeout on send and recv operations.
22 */
23 class AdminSocketClient
24 {
25 public:
26 AdminSocketClient(const std::string &path);
27 std::string do_request(std::string request, std::string *result);
28 std::string ping(bool *ok);
29 private:
30 std::string m_path;
31 };
32
33 const char* get_rand_socket_path();
34
35 #endif