PDA

Click to See Complete Forum and Search --> : Multiple threads with Winsock


rcecinati
Jan 8th, 2001, 05:03 PM
Hello,
I'm trying to implement a client capable of firing multiple HTTP requests on the internet in an asynchronous way, that is w/o waiting for each to be completed before submitting a new one.
I am using a Winsock control with the array property, opening and using multiple istances of the control. The problem is that the DataArrival event doesn't seem to be fired after any of the SendData is issued.

In the literature I have found so far uses of the array'ed Winsock as a server (to accept multiple connections), none as a client. Maybe it's a dream? In such a case, how to multi-thread VB?

thank you Riccardo

plenderj
Jan 9th, 2001, 02:11 AM
The data arrival event is only supposed to fire when data comes back into the socket, not data on the way out ....

nkad
Jan 9th, 2001, 12:51 PM
Vb isn't multithreaded. So in such cases as yours or let's say you were making a game and you had to constantly check the keyboard for "quick little fingers". Then you could use an API call to Spawn a new thread for just that purpose. I don't know the call but it is located in the API viewer. Becareful when working with threads, and make sure you SAVE YOUR PROJECT BEFOR TRYING IT!!!

Un1
Aug 9th, 2001, 06:44 AM
No GFP, Cool!

Serial port control:
http://www.banasoft.com/DownLoad/BNComm.exe

Winsock controls:
http://www.banasoft.com/DownLoad/BNWinsck.exe