Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create threads with Win32 API? [closed]

I have written a TCP server with Win32 API and C++ but it's single-threaded. Can anyone tell me how would I go about making it multi-threaded? I imagine for every new accepted connection, I'd have to spawn a thread that takes care of it. But I have never had experience with threading in Win32. Can anyone tell me how I would go about threaded programming with Win32 and C++?

like image 786
bodacydo Avatar asked Aug 31 '11 16:08

bodacydo


1 Answers

Read the documentation of :

  • CreateThread Function

And you can also see an example in my answer here:

  • Multithreading in c++
  • run threads of class member function in c++
like image 120
Nawaz Avatar answered Oct 02 '22 15:10

Nawaz