sends a packet, if needed it will establish a connection before options used: ignore max connections, control packet, delete packet !if the functions returns false it is _possible_ that this clientobject was deleted, because the connectiontry fails
| 2030 | // options used: ignore max connections, control packet, delete packet |
| 2031 | // !if the functions returns false it is _possible_ that this clientobject was deleted, because the connectiontry fails |
| 2032 | bool CUpDownClient::SafeSendPacket(CPacket* packet) |
| 2033 | { |
| 2034 | if (IsConnected()) { |
| 2035 | SendPacket(packet, true); |
| 2036 | return true; |
| 2037 | } else { |
| 2038 | m_WaitingPackets_list.push_back(packet); |
| 2039 | return TryToConnect(true); |
| 2040 | } |
| 2041 | } |
| 2042 | |
| 2043 | void CUpDownClient::SendPublicKeyPacket() |
| 2044 | { |