fastcgi++
A C++ FastCGI/Web API
message.hpp
Go to the documentation of this file.
1 
10 /*******************************************************************************
11 * Copyright (C) 2017 Eddie Carle [eddie@isatec.ca] *
12 * *
13 * This file is part of fastcgi++. *
14 * *
15 * fastcgi++ is free software: you can redistribute it and/or modify it under *
16 * the terms of the GNU Lesser General Public License as published by the Free *
17 * Software Foundation, either version 3 of the License, or (at your option) *
18 * any later version. *
19 * *
20 * fastcgi++ is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for *
23 * more details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with fastcgi++. If not, see <http://www.gnu.org/licenses/>. *
27 *******************************************************************************/
28 
29 #ifndef MESSAGE_HPP
30 #define MESSAGE_HPP
31 
32 #include "fastcgi++/block.hpp"
33 
34 namespace Fastcgipp
35 {
37 
46  struct Message
47  {
48  Message(const int type_):
49  type(type_)
50  {}
51 
53  type(0)
54  {}
55 
57  type(x.type),
58  data(std::move(x.data))
59  {}
60 
62  {
63  type=x.type;
64  data=std::move(x.data);
65  return *this;
66  }
67 
68  Message(const Message&) =delete;
69  Message& operator=(const Message&) =delete;
70 
72  int type;
73 
76  };
77 }
78 
79 #endif
Topmost namespace for the fastcgi++ library.
Message & operator=(Message &&x)
Definition: message.hpp:61
Data structure used to pass messages to requests.
Definition: message.hpp:46
STL namespace.
Message(Message &&x)
Definition: message.hpp:56
Message(const int type_)
Definition: message.hpp:48
Block data
The raw data being passed along with the message.
Definition: message.hpp:75
Declares the Block data structure.
Data structure to hold a block of raw data.
Definition: block.hpp:44
int type
Type of message. A 0 means FastCGI record. Anything else is open.
Definition: message.hpp:72