Multiple Threads in a VB winsock program ?

Multiple Threads in a VB winsock program ?

Post by Daniel Vi » Tue, 25 Nov 1997 04:00:00

When you use a timer,  VB uses a new thread for the TIMER sub.
You can use this little trick to do some work in a new thread

Daniel Vilc - MCSE

>I have a winsock program written in visual basic, that sends mail via SMTP
>to my mail host (stress testing it).
>However it can only send one message at a time (so it's hardly a stress
>Does anyone know how (and if so could you tell me) to get the visual basic
>program/winsock control to open multiple threads.
>Do I need several controls? If so how do I get them running in parallel?
>Many thanks
>Peter Gradwell
>EMail Peter at Gradwell dot com
>New Look NOW! - MS SiteBuilder Level 2
>Checkout Checkmail - The Mac Demon mail automation script on my site.


1. multiple processes & multiple threads program has advantage over one process & multiple threads program ?

for example, when implementing a FTP server, one optioins is to make
it multiple processes and each process creates multiple threads;
Option 2 is to use ONLY one process but create the same number of
total threads as the options 1.

Which option has better performance ?

I think the options 2 is better since process spawning is more

So go further, what is the point to use fork() when we have multple
threads ?

Any comments are appreciated.


2. Many programs output to one console ?

3. Multiple Threads in a VB winsock program ?

4. msn status

5. Is it OK to call winsock from multiple threads?

6. Help! OS/2 2.0 Illiterate!

7. Multiple Threads/Connections in Winsock

8. Summary of responses to Wanted...PostScript etc

9. Multiple Instances of Winsock program crash on TCP connect

10. Multiple Threads / Semaphores / VB or C++

11. FREE winsock over dial-ins without SLIP

12. Winsock Redirectors & Plug-Ins

13. Vb, Winsock, Threads and Client/Server problem