Hello, i've been learning winsock programming all day long...I learned Receiving, Sending, Accepting connections.
Now, i was having fun until i realised i can't accept connections and Actually (Do the server work <<Receiving and sending data<<)
I need a way to multithread to actually make it Accept connections and send/receive data at the same time.
I have no idea how to do multithreading. Well, i one day used a multithread function, but if you can please tell me what is the best library to use to multithread?
This is a Windows programming question. Wrong forum.
Multithreading isn't only Windows programming...
>> what is the best library to use to multithread?
For windows, the windows API. For everything else, the Posix API. If you want a cross platform and C++ API, then boost::thread.
Posix API (pthreads) works on any platform if you install the libraries.
Originally Posted by Codeplug
check out this thread where I helped out a guy with some threading stuff using pthreads.
You are presuming that multithreading is the only solution -- it isn't. There's also select(), which was the way this was traditionally handled before threads became widespread.
Threading might be the best solution here or it might not. We don't know enough to say for sure.