My Project
NPLMsgIn.h
1 #pragma once
2 #include "NPLMsgHeader.h"
3 namespace NPL
4 {
8  struct NPLMsgIn
9  {
11  std::string method;
13  std::string m_rts_name;
15  std::string m_filename;
16  int m_n_filename; // the filename number agreed upon dynamically by the sender and receiver. In http response this is the return code.
17  int npl_version_major;
18  int npl_version_minor;
19 
21  std::vector<NPLMsgHeader> headers;
22 
24  int m_nLength;
26  std::string m_code;
27 
30  public:
31  void reset()
32  {
33  method.clear();
34  m_rts_name.clear();
35  m_n_filename = 0;
36  m_filename.clear();
37 
38  headers.clear();
39 
40  m_nLength = 0;
41  m_code.clear();
42  }
43 
44  bool IsNPLFileActivation()
45  {
46  return (method.size() > 0 && (((byte)(method[0])) > 127 || method == "A"));
47  }
48  };
49 
50 } // NPL
std::vector< NPLMsgHeader > headers
optional headers
Definition: NPLMsgIn.h:21
std::string method
in request this is "A", "GET"; in HTTP response, this is "HTTP/1.1"
Definition: NPLMsgIn.h:11
std::string m_code
msg body
Definition: NPLMsgIn.h:26
define this to enable debugging of NPL code in visual studio
Definition: INPL.h:9
int m_nLength
number of bytes in m_code
Definition: NPLMsgIn.h:24
std::string m_filename
NPL or Dll file name (uri); in http response this is "OK", "error".
Definition: NPLMsgIn.h:15
A incoming or outgoing connection.
Definition: NPLConnection.h:30
A NPL msg received from a socket.
Definition: NPLMsgIn.h:8
std::string m_rts_name
NPL runtime state name.
Definition: NPLMsgIn.h:13
CNPLConnection * m_pConnection
the connection object from which this message is received.
Definition: NPLMsgIn.h:29