sources/network/rconsession.cpp

changeset 17
50341dec533e
parent 15
33da84af4bba
child 21
12e4ff8bb471
equal deleted inserted replaced
16:33bac54867bf 17:50341dec533e
256 STATIC METHOD 256 STATIC METHOD
257 RCONSession::get_session() -> RCONSession* 257 RCONSession::get_session() -> RCONSession*
258 { 258 {
259 return g_rconSession; 259 return g_rconSession;
260 } 260 }
261
262 // -------------------------------------------------------------------------------------------------
263 // Returns true if the message was successfully sent.
264 //
265 METHOD
266 RCONSession::send_command (const String& message) -> bool
267 {
268 if (m_state != RCON_CONNECTED)
269 return false;
270
271 Bytestream packet;
272 packet.write_byte (CLRC_COMMAND);
273 packet.write_string (message);
274 send (packet);
275 bump_last_ping();
276 return true;
277 }

mercurial