Leandro Delamare
2004-11-30 17:45:26 UTC
Hello group..
I Have a problem,
Im my program I have one pool.QueueRequest in 3 server
and this return for me the faster server.
But this don't work with proxy.. How can I make this work with proxy
Have no problem in change this code to use a function of WiniNet
Please, someone can help me..
Regards
The code is :
CThreadPool<CompanySServer> pool;
bool ret = true;
InterlockedExchange(&EzNav_lCurrId, -1);
InterlockedExchange(&EzNav_lServer, 0);
EzNav_IndexId = NULL;
EzNav_SSeek = true;
EzNav_Servers.RemoveAll();
HRESULT hr = pool.Initialize((void*)321, THREADPOOL_SIZE);
if ( SUCCEEDED( hr ) )
{
int timeout = 0;
pool.QueueRequest( (CompanySServer::RequestType)
"http://server1.company.com" );
pool.QueueRequest( (CompanySServer::RequestType)
"http://server2.company.com" );
pool.QueueRequest( (CompanySServer::RequestType)
"http://server3.company.com" );
while (Company_lServer != 2 && timeout++ < 100)
{
Sleep(500);
}
pool.Shutdown();
}
I Have a problem,
Im my program I have one pool.QueueRequest in 3 server
and this return for me the faster server.
But this don't work with proxy.. How can I make this work with proxy
Have no problem in change this code to use a function of WiniNet
Please, someone can help me..
Regards
The code is :
CThreadPool<CompanySServer> pool;
bool ret = true;
InterlockedExchange(&EzNav_lCurrId, -1);
InterlockedExchange(&EzNav_lServer, 0);
EzNav_IndexId = NULL;
EzNav_SSeek = true;
EzNav_Servers.RemoveAll();
HRESULT hr = pool.Initialize((void*)321, THREADPOOL_SIZE);
if ( SUCCEEDED( hr ) )
{
int timeout = 0;
pool.QueueRequest( (CompanySServer::RequestType)
"http://server1.company.com" );
pool.QueueRequest( (CompanySServer::RequestType)
"http://server2.company.com" );
pool.QueueRequest( (CompanySServer::RequestType)
"http://server3.company.com" );
while (Company_lServer != 2 && timeout++ < 100)
{
Sleep(500);
}
pool.Shutdown();
}