Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.60 KB | None | 0 0
  1. #ifndef _LOADBALANCESOCKET_H
  2. #define _LOADBALANCESOCKET_H
  3.  
  4.  
  5. #include <TcpSocket.h>
  6. #include "ServerGuardian.h"
  7.  
  8.  
  9. class LoadbalanceSocket : public TcpSocket
  10. {
  11.  
  12.     public:
  13.  
  14.         LoadbalanceSocket( ISocketHandler& , ServerGuardian* );
  15.     ~LoadbalanceSocket();
  16.  
  17.         void OnConnect();
  18.         void OnLine( const std::string& line );
  19.  
  20.     private:
  21.  
  22.         ServerGuardian *serverGuardian;
  23.  
  24. };
  25.  
  26.  
  27. #endif // _LOADBALANCESOCKET_H
  28.  
  29.  
  30. In file included from ServerGuardian.h:18,
  31. LoadbalanceSocket.h:25: error: ‘ServerGuardian’ has not been declared
  32. LoadbalanceSocket.h:33: error: ISO C++ forbids declaration of ‘ServerGuardian’ with no type
  33. LoadbalanceSocket.h:33: error: expected ‘;’ before ‘*’ token
  34. make: *** [SocketFactory.o] Error 1
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. #ifndef SERVERGUARDIAN_H
  42. #define SERVERGUARDIAN_H
  43.  
  44. #include "ServerGuardian.h"
  45. #include <ListenSocket.h>
  46. #include <TcpSocket.h>
  47. #include "LoadbalanceSocket.h"
  48. #include "RelaySocket.h"
  49. #include "ServerSocket.h"
  50. #include "SocketFactory.h"
  51. #include <string>
  52.  
  53.  
  54. class ServerGuardian
  55. {
  56.  
  57.     public:
  58.  
  59.         ServerGuardian();
  60.     ~ServerGuardian();
  61.  
  62.         void InitiateLoadbalanceSocket();
  63.         void InitiateRelayListenSocket();
  64.         void InitiateServerListenSocket();
  65.  
  66.     public:
  67.  
  68.         SocketFactory *socketFactory;
  69.         std::list< std::string > loadbalanceAddresses;
  70.         LoadbalanceSocket *loadbalanceSocket;
  71.         RelaySocket *relaySocket;
  72.         ListenSocket<ServerSocket> *serverListenSocket;
  73.         ListenSocket<ServerSocket> *serverListenSocketSSL;
  74.  
  75. };
  76.  
  77.  
  78. #endif  /* SERVERGUARDIAN_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement