C++ threaded TCP Server

Posted on 2006-04-14
Last Modified: 2006-11-18

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
Question by:woigl
    LVL 5

    Accepted Solution

    LVL 86

    Expert Comment

    by:jkr ("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 - but that onw is dead now)
    LVL 86

    Expert Comment

    Oh, as for the threading part - see also ("POSIX Threads Programming")

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now