summaryrefslogtreecommitdiff
path: root/src/rgw/rgw_mongoose.h
blob: e49f663130a393daef820baac4e23e934d6070a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef CEPH_RGW_MONGOOSE_H
#define CEPH_RGW_MONGOOSE_H

#include "rgw_client_io.h"


struct mg_connection;


class RGWMongoose : public RGWClientIO
{
  mg_connection *conn;

  bufferlist header_data;

  bool sent_header;

protected:
  void init_env(CephContext *cct);

  int write_data(const char *buf, int len);
  int read_data(char *buf, int len);

  int send_status(const char *status, const char *status_name);
  int send_100_continue();
  int complete_header();

public:
  RGWMongoose(mg_connection *_conn);
  void flush();
};


#endif