void VNCviewerApp32::NewConnection(TCHAR *host, int port) { int retries = 0; ClientConnection *pcc; ClientConnection *old_pcc; pcc = new ClientConnection(this, host, port); while (retries < MAX_AUTH_RETRIES) { try { pcc->Run(); return; } catch (AuthException &e) { e.Report(); // If the connection count drops to zero, the app exits. old_pcc = pcc; pcc = new ClientConnection(this, host, port); // Get the previous options for the next try. pcc->CopyOptions(old_pcc); delete old_pcc; } catch (Exception &e) { e.Report(); break; } retries++; } delete pcc; }
void VNCviewerApp32::NewConnection() { ClientConnection *pcc = new ClientConnection(this); try { pcc->Run(); } catch (Exception &e) { // DestroyWindow(pcc->m_hwndMain); pcc->CloseWindows(); e.Report(); delete pcc; } }
void VNCviewerApp32::NewConnection(bool Is_Listening,TCHAR *host, int port) { ClientConnection *pcc = new ClientConnection(this, host,port); try { pcc->m_Is_Listening=Is_Listening; pcc->Run(); } catch (Exception &e) { // DestroyWindow(pcc->m_hwndMain); pcc->CloseWindows(); e.Report(); delete pcc; } }
void VNCviewerApp32::NewConnection(bool Is_Listening) { ClientConnection *pcc = new ClientConnection(this); try { memcpy((char*)&pcc->m_opts,(char*)&m_options,sizeof(m_options)); pcc->m_Is_Listening=Is_Listening; pcc->Run(); } catch (Exception &e) { // DestroyWindow(pcc->m_hwndMain); pcc->CloseWindows(); e.Report(); delete pcc; } }