sources/network/rconsession.cpp

changeset 186
9330b93d9946
parent 185
e83ec58cc458
child 189
248d0b85cbda
equal deleted inserted replaced
185:e83ec58cc458 186:9330b93d9946
54 // 54 //
55 RCONSession::~RCONSession() {} 55 RCONSession::~RCONSession() {}
56 56
57 // ------------------------------------------------------------------------------------------------- 57 // -------------------------------------------------------------------------------------------------
58 // 58 //
59 void RCONSession::connect(IPAddress address) 59 void RCONSession::connect(net::ip_address address)
60 { 60 {
61 m_address = address; 61 m_address = address;
62 m_state = RCON_CONNECTING; 62 m_state = RCON_CONNECTING;
63 m_interface->updateStatusBar(); 63 m_interface->updateStatusBar();
64 sendHello(); 64 sendHello();
275 275
276 // ------------------------------------------------------------------------------------------------- 276 // -------------------------------------------------------------------------------------------------
277 // 277 //
278 void RCONSession::sendHello() 278 void RCONSession::sendHello()
279 { 279 {
280 m_interface->print("Connecting to %s...\n", m_address.to_string(IPAddress::WITH_PORT).data()); 280 m_interface->print("Connecting to %s...\n", net::ip_address_to_string(m_address).data());
281 send({CLRC_BEGINCONNECTION, RCON_PROTOCOL_VERSION}); 281 send({CLRC_BEGINCONNECTION, RCON_PROTOCOL_VERSION});
282 bumpLastPing(); 282 bumpLastPing();
283 } 283 }
284 284
285 // ------------------------------------------------------------------------------------------------- 285 // -------------------------------------------------------------------------------------------------
342 return m_state; 342 return m_state;
343 } 343 }
344 344
345 // ------------------------------------------------------------------------------------------------- 345 // -------------------------------------------------------------------------------------------------
346 // 346 //
347 const IPAddress& RCONSession::address() const 347 const net::ip_address& RCONSession::address() const
348 { 348 {
349 return m_address; 349 return m_address;
350 } 350 }
351 351
352 // ------------------------------------------------------------------------------------------------- 352 // -------------------------------------------------------------------------------------------------

mercurial