T
trgarbe
Hello,
I've created a multi-threaded Win32 application to dial up to vending
machines (i.e. PCs) to pull off some data. The application uses the RAS
API to establish the PPP connections (for TCP/IP).
My problem is that when my application calls the RasDial function
simultaneously from different threads some RasDial calls fail with
error 619 or 628. For example if I start 10 threads calling RasDial()
some of them fail with one of these error codes.
If I synchronize the threads to make the calls to the RasDial function
sequential, followed by a 10 second delay then all works beautiful!
EnterCriticalSection(...)
RasDial(...)
Sleep(10000); // required as well
LeaveCriticalSection(...)
I suppose something in RAS is processed in a sequential manner. Thus
each connection establishment must wait until the former finished and
if this takes too long (as the 10th must wait extremely long) it
experiences a timeout.
Here're the facts:
- Application running on Windows 2000 Server with all current updates
- Communications hardware: Eicon DIVA Server PRI ISDN card (max. 30
ISDN connections)
- Machines I dial up to: Windows 2000 Pro/Server, Windows XP Pro
- Different PhoneBook entry for each thread/RasDial call
- Server assigned/client supplied IP does not matter
- Using synchronous RasDial() without window handle or callback
Any solution?
Thank you
Tobias
I've created a multi-threaded Win32 application to dial up to vending
machines (i.e. PCs) to pull off some data. The application uses the RAS
API to establish the PPP connections (for TCP/IP).
My problem is that when my application calls the RasDial function
simultaneously from different threads some RasDial calls fail with
error 619 or 628. For example if I start 10 threads calling RasDial()
some of them fail with one of these error codes.
If I synchronize the threads to make the calls to the RasDial function
sequential, followed by a 10 second delay then all works beautiful!
EnterCriticalSection(...)
RasDial(...)
Sleep(10000); // required as well
LeaveCriticalSection(...)
I suppose something in RAS is processed in a sequential manner. Thus
each connection establishment must wait until the former finished and
if this takes too long (as the 10th must wait extremely long) it
experiences a timeout.
Here're the facts:
- Application running on Windows 2000 Server with all current updates
- Communications hardware: Eicon DIVA Server PRI ISDN card (max. 30
ISDN connections)
- Machines I dial up to: Windows 2000 Pro/Server, Windows XP Pro
- Different PhoneBook entry for each thread/RasDial call
- Server assigned/client supplied IP does not matter
- Using synchronous RasDial() without window handle or callback
Any solution?
Thank you
Tobias