sources/network/rconsession.h

changeset 27
089e37c0887e
parent 24
e651d02802c0
child 31
b5b5a6a96d91
equal deleted inserted replaced
26:24c7b804c99f 27:089e37c0887e
88 class RCONSession 88 class RCONSession
89 { 89 {
90 public: 90 public:
91 ~RCONSession(); 91 ~RCONSession();
92 92
93 METHOD address() const -> const IPAddress&;
93 METHOD connect (IPAddress address) -> void; 94 METHOD connect (IPAddress address) -> void;
94 METHOD disconnect() -> void; 95 METHOD disconnect() -> void;
95 METHOD handle_packet (Bytestream& packet, const IPAddress& from) -> void; 96 METHOD handle_packet (Bytestream& packet, const IPAddress& from) -> void;
96 METHOD process_server_updates (Bytestream& packet) -> void; 97 METHOD process_server_updates (Bytestream& packet) -> void;
98 METHOD num_admins() const -> int;
97 METHOD send (const Bytestream& packet) -> void; 99 METHOD send (const Bytestream& packet) -> void;
98 METHOD send_hello() -> void; 100 METHOD send_hello() -> void;
99 METHOD send_password() -> void; 101 METHOD send_password() -> void;
100 METHOD set_password (const String& password) -> void; 102 METHOD set_password (const String& password) -> void;
101 METHOD socket() -> UDPSocket*; 103 METHOD socket() -> UDPSocket*;
102 METHOD tick() -> void; 104 METHOD tick() -> void;
103 METHOD bump_last_ping() -> void; 105 METHOD bump_last_ping() -> void;
104 METHOD send_command (const String& message) -> bool; 106 METHOD send_command (const String& message) -> bool;
105 METHOD state() const -> RCONSessionState; 107 METHOD state() const -> RCONSessionState;
108 METHOD level() const -> const String&;
106 109
107 static METHOD new_session() -> RCONSession*; 110 static METHOD new_session() -> RCONSession*;
108 static METHOD get_session() -> RCONSession*; 111 static METHOD get_session() -> RCONSession*;
109 112
110 private: 113 private:
116 time_t m_lastPing; 119 time_t m_lastPing;
117 String m_password; 120 String m_password;
118 String m_salt; 121 String m_salt;
119 int m_serverProtocol; 122 int m_serverProtocol;
120 String m_hostname; 123 String m_hostname;
124 int m_numAdmins;
125 String m_level;
121 }; 126 };

mercurial