Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best wait state.
Message
From
21/07/2003 11:18:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Best wait state.
Miscellaneous
Thread ID:
00812017
Message ID:
00812017
Views:
50
I have a Web Service that I want to send SMTP e-mail. I have a program that uses the winsock control to send SMTP e-mail and I want to use that in the webservice.

The problem is I need my Web Service to stop and wait until the winsock control is finished. Since the winsock needs to connect then wait fot the connect then send information and wait for the respons. So I need to put in a loop to see when I'm finished. I tried
DO WHILE oWinsock.State <> 7
   DOEVENTS
ENDDO
That worked but it still eats up a lot of the CPU. Is there a better way to wait? I was thinking DOEVENTS FORCE but if the machine is not logged in I don't know if that will just hang the machine. I also don't want to use the Sleep API because that seems to stop the winsock sending and receiving information as well as the Web Service. Any ideas?
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Next
Reply
Map
View

Click here to load this message in the networking platform