GameServer
WordCheckServerConnection.h
[詳解]
1 #ifndef __WORDCHECKSERVERCONNECTION_H__
2 #define __WORDCHECKSERVERCONNECTION_H__
3 
4 #include "TCPConnection.h"
5 
6 class PacketBase;
7 
11 class WordCheckServerConnection : public TCPConnection, public noncopyable
12 {
13 
14 public:
15 
16  // コンストラクタ
17  WordCheckServerConnection(const shared_ptr<tcp::socket> &pInSocket);
18 
19  // デストラクタ
21 
22  // 接続.
23  bool Connect();
24 
25  // パケット送信.
26  void SendPacket(PacketBase *pPacket);
27 
28 protected:
29 
30  // データを受信した。
31  virtual void OnRecvData(size_t Size);
32 
33  // 切断された。
34  virtual void OnDisconnected();
35 
36 private:
37 
38  // ============ Singletonもどき ================
39 
40 public:
41 
42  static WordCheckServerConnection *GetInstance() { return pInstance; }
43 
44 private:
45 
46  static WordCheckServerConnection *pInstance;
47 
48 };
49 
50 #endif // #ifndef __WORDCHECKSERVERCONNECTION_H__
virtual void OnDisconnected()
Definition: WordCheckServerConnection.cpp:82
void SendPacket(PacketBase *pPacket)
Definition: WordCheckServerConnection.cpp:40
static WordCheckServerConnection * GetInstance()
Definition: WordCheckServerConnection.h:42
Definition: WordCheckServerConnection.h:11
Definition: TCPConnection.h:9
bool Connect()
Definition: WordCheckServerConnection.cpp:22
WordCheckServerConnection(const shared_ptr< tcp::socket > &pInSocket)
Definition: WordCheckServerConnection.cpp:15
Definition: PacketBase.h:9
virtual ~WordCheckServerConnection()
Definition: WordCheckServerConnection.h:20
virtual void OnRecvData(size_t Size)
Definition: WordCheckServerConnection.cpp:61