NymphRPC Remote Procedure Call Library
nymph_session.h
1 /*
2  nymph_session.h - header file for the NymphRPC Session class.
3 
4  Revision 0
5 
6  Notes:
7  - This class declares the session class to be used by Nymph servers.
8 
9  History:
10  2017/06/24, Maya Posch : Initial version.
11 
12  (c) Nyanko.ws
13 */
14 
15 
16 #pragma once
17 #ifndef NYMPH_SESSION_H
18 #define NYMPH_SESSION_H
19 
20 #include <string>
21 
22 #include <Poco/Net/TCPServerConnection.h>
23 #include <Poco/Mutex.h>
24 
25 
26 class NymphSession : public Poco::Net::TCPServerConnection {
27  std::string loggerName;
28  int handle;
29  static int lastSessionHandle;
30  static Poco::Mutex handleMutex;
31 
32 public:
33  NymphSession(const Poco::Net::StreamSocket& socket);
34  void run();
35  bool send(std::string& msg, std::string &result);
36 };
37 
38 #endif
Definition: nymph_session.h:26