C++ threaded TCP Server


i want to write a multithreaded TCP (Socket) Server on Linux...

Can someone advise me how to write this? or provide an example

-Threaded Connection

The Main Thread should have the socket listener and if a client is connected then this should be handled by a separate thread...

Thanks Woigl
Who is Participating?
http://linux.derkeiler.com/Mailing-Lists/RedHat/2004-06/0558.html ("Multithreaded HTTP Server for Linux built up by the pool of threads utilizing select() system call.") might be interesting for you also (the article was formerly available from http://www.linuxgazette.com/node/10175 - but that onw is dead now)
Oh, as for the threading part - see also http://www.llnl.gov/computing/tutorials/pthreads/ ("POSIX Threads Programming")
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.