Results 1 to 4 of 4

Thread: Multiple threads with Winsock

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Italy
    Posts
    1

    Cool

    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

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    The data arrival event is only supposed to fire when data comes back into the socket, not data on the way out ....
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770

    Wink

    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!!!

  4. #4
    Member
    Join Date
    Mar 2001
    Posts
    56

    True multithread VB5 VB6 source code control:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width