4 #include <netinet/ip.h>
10 #include "stg/os_int.h"
11 #include "stg/blowfish.h"
17 typedef bool (PROTO::*PacketProcessor)(char *);
21 PROTO(const std::string & server,
30 const std::string GetStrError() const { return errorStr; }
32 bool Connect(const std::string & login);
33 bool Disconnect(const std::string & login);
37 struct sockaddr_in localAddr;
38 struct sockaddr_in serverAddr;
41 std::map<std::string, USER> users;
50 std::map<std::string, PacketProcessor> processors;
52 static void * Runner(void * data);
56 bool HandlePacket(char * buffer);
58 bool CONN_SYN_ACK_Proc(char * buffer);
59 bool ALIVE_SYN_Proc(char * buffer);
60 bool DISCONN_SYN_ACK_Proc(char * buffer);
61 bool FIN_Proc(char * buffer);
62 bool INFO_Proc(char * buffer);
63 bool ERR_Proc(char * buffer);