forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
SqlProxy.h
1 #ifndef CLIENTMGR_H
2 #define CLIENTMGR_H
3 
4 #include "Forest.h"
5 #include <mysql++/mysql++.h>
6 #include <mysql++/ssqls.h>
7 class SqlProxy {
8 public:
9  void run(uint32_t);
10  bool init(ipa_t,ipa_t,char*,char*,char*,char*);
11  ipa_t extIp;
12  ipa_t intIp;
13 
14  const static int LISTEN_PORT = 30190;
15  const static int UPDATE_PERIOD = 50;
16 
17  mysqlpp::Connection * sqlconn; //< pointer to mysql connection
18 
19  int tcpSockInt;
20  int tcpSockExt;
21  int sqlSock;
22 };
23 sql_create_3(user_pass,1,3,
24  mysqlpp::sql_int, id,
25  mysqlpp::sql_varchar, user,
26  mysqlpp::sql_varchar, pass)
27 
28 #endif