| 836 | // CConnectionBase |
| 837 | |
| 838 | bool CClient::OnConnect(bool boConnected) |
| 839 | { |
| 840 | if (boConnected) |
| 841 | { |
| 842 | for (size_t i = 0; i < m_listeners.Count(); ++i) |
| 843 | { |
| 844 | if (!SendMessage(eMessage_ChannelRegister, m_listeners.Channel(i), 0)) |
| 845 | return false; |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | CryAutoLock<CryCriticalSection> lock(m_stConnectionCallbacksLock); |
| 850 | for (size_t nCount = 0; nCount < m_cNotificationNetworkConnectionCallbacks.size(); ++nCount) |
| 851 | { |
| 852 | m_cNotificationNetworkConnectionCallbacks[nCount]->OnConnect(this, boConnected); |
| 853 | } |
| 854 | |
| 855 | return boConnected; |
| 856 | } |
| 857 | |
| 858 | bool CClient::OnDisconnect() |
| 859 | { |