MCPcopy Create free account
hub / github.com/amule-project/amule / StopConnectionTry

Method StopConnectionTry

src/ServerConnect.cpp:167–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166
167void CServerConnect::StopConnectionTry()
168{
169 connectionattemps.clear();
170 connecting = false;
171 singleconnecting = false;
172
173 if (m_idRetryTimer.IsRunning())
174 {
175 m_idRetryTimer.Stop();
176 }
177
178 // close all currently opened sockets except the one which is connected to our current server
179 for(SocketsList::iterator it = m_lstOpenSockets.begin(); it != m_lstOpenSockets.end(); ) {
180 CServerSocket *pSck = *it++;
181 if (pSck == connectedsocket) // don't destroy socket which is connected to server
182 continue;
183 if (pSck->m_bIsDeleting == false) // don't destroy socket if it is going to destroy itself later on
184 DestroySocket(pSck);
185 }
186}
187
188void CServerConnect::ConnectionEstablished(CServerSocket* sender)
189{

Callers 4

OnTCPTimerMethod · 0.45
OnRemoveServersMethod · 0.45
OnBnConnectMethod · 0.45

Calls 5

clearMethod · 0.45
IsRunningMethod · 0.45
StopMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected