intel i7 ( 4X cores with ht)
OS ssd in raid0
LAN 1gb wired and 300MB WIfi
I guess we also can exlude this one...
sockets are sync, no async
All initial communication is done in a single thread
start_undetached(); split the viewer of
Code: Select all
void ClientConnection::Run()
{
havetobekilled=false;
forcedexit=false;
// Get the host name and port if we haven't got it
if (m_port == -1)
{
GetConnectDetails();
// sf@2002 - DSM Plugin loading if required
LoadDSMPlugin(false);
}
else
{
LoadDSMPlugin(false);
// sf@2003 - Take command line quickoption into account
HandleQuickOption();
}
// add user option on command line
if ( (strlen( m_pApp->m_options.m_cmdlnUser) > 0) && !m_pApp->m_options.m_NoMoreCommandLineUserPassword) // Fix by Act
strcpy(m_cmdlnUser, m_pApp->m_options.m_cmdlnUser);
// Modif sf@2002 - bit of a hack...and unsafe
if ( (strlen( m_pApp->m_options.m_clearPassword) > 0) && !m_pApp->m_options.m_NoMoreCommandLineUserPassword)
strcpy(m_clearPasswd, m_pApp->m_options.m_clearPassword);
if (saved_set)
{
saved_set=FALSE;
Save_Latest_Connection();
}
GTGBS_CreateDisplay();
GTGBS_CreateToolbar();
CreateDisplay();
DoConnection(); // sf@2007 - Autoreconnect - Must be done after windows creation, otherwise ReadServerInit does not initialise the title bar...
//adzm 2009-06-21 - if we are connected now, show the window
ShowWindow(m_hwndcn, SW_SHOW);
// adzm - 2010-07 - Fix clipboard hangs - watch the clipboard now that our message pump will not be blocking on connection
WatchClipboard();
Createdib();
SizeWindow();
// This starts the worker thread.
// The rest of the processing continues in run_undetached.
LowLevelHook::Initialize(m_hwndMain);
start_undetached(); [color=red]<<<<<<<<<<<split thread[/color]
EndDialog(m_hwndStatus,0);
}
Code: Select all
void ClientConnection::DoConnection()
{
havetobekilled=true;
// Connect if we're not already connected
if (m_sock == INVALID_SOCKET)
if (strcmp(m_proxyhost,"") !=NULL && m_fUseProxy)
ConnectProxy();
else
Connect();
SetSocketOptions();
SetDSMPluginStuff(); // The Plugin is now activated BEFORE the protocol negociation
// so ALL the communication data travel through the DSMPlugin
if (strcmp(m_proxyhost,"")!=NULL && m_fUseProxy)
NegotiateProxy();
NegotiateProtocolVersion();
std::vector<CARD32> current_auth;
Authenticate(current_auth);
// if (flash) {flash->Killflash();}
SendClientInit();
ReadServerInit();
CreateLocalFramebuffer();
SetupPixelFormat();
SetFormatAndEncodings();
reconnectcounter=m_reconnectcounter;
havetobekilled=false;;
}