rasdaman complete source
srvrasmgrcomm.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 */
23 /*************************************************************
24  *
25  *
26  * PURPOSE:
27  *
28  *
29  * COMMENTS:
30  *
31  ************************************************************/
32 
33 #ifndef SRVRASMGR_HH
34 #define SRVRASMGR_HH
35 
36 #define SERVER_DOWN 0
37 #define SERVER_AVAILABLE 1
38 // 2 is server crushed, but it's generated by rasmgr!
39 // regularly signal the rasmgr that we are available
40 #define SERVER_REGULARSIG 3
41 
46 {
47 public:
48  SrvRasmgrComm();
49 
50  void init(unsigned int timeOut, const char* instanceName, const char* rasmgrHost, int rasmgrPort);
51 
55 
56  unsigned int getTimeout();
57 
58 private:
59  void informRasMGR(int what);
60  int writeWholeMessage(int socket,char *destBuffer,int buffSize);
61 
62  const char* serverName;
63  const char* rasmgrHost;
64  int rasmgrPort;
65  unsigned int timeout;
66 };
67 
69 
70 #endif
unsigned int getTimeout()
SrvRasmgrComm rasmgrComm
void informRasmgrServerStillAvailable()
Definition: srvrasmgrcomm.hh:45
void init(unsigned int timeOut, const char *instanceName, const char *rasmgrHost, int rasmgrPort)
void informRasmgrServerDown()
void informRasmgrServerAvailable()