From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D8A6E13800E for ; Mon, 3 Feb 2014 19:05:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A785DE0AE3; Mon, 3 Feb 2014 19:05:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B2BBBE09B3 for ; Mon, 3 Feb 2014 19:05:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CED9D33F8C6 for ; Mon, 3 Feb 2014 19:05:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -1.318 X-Spam-Level: X-Spam-Status: No, score=-1.318 tagged_above=-999 required=5.5 tests=[AWL=-1.971, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.547, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no Received: from smtp.gentoo.org ([IPv6:::ffff:127.0.0.1]) by localhost (smtp.gentoo.org [IPv6:::ffff:127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cuAkg9XuZmoB for ; Mon, 3 Feb 2014 19:05:45 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E057D33EE9E for ; Mon, 3 Feb 2014 19:05:44 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WAOpv-0003yF-TV for gentoo-user@gentoo.org; Mon, 03 Feb 2014 20:05:39 +0100 Received: from dsl.comtrol.com ([64.122.56.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Feb 2014 20:05:39 +0100 Received: from grant.b.edwards by dsl.comtrol.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Feb 2014 20:05:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: Tcp Listener Date: Mon, 3 Feb 2014 19:05:17 +0000 (UTC) Message-ID: References: <52EFDCB4.5040106@gmail.com> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dsl.comtrol.com User-Agent: slrn/1.0.1 (Linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Archives-Salt: ba3e30f5-3db3-49a0-8666-199f7ea2a198 X-Archives-Hash: af18ea6e79c41f5e0d38c5d826420548 On 2014-02-03, xarman wrote: > I'm interested in making a TCP Listener in C / C++ on Linux to accept > many connections simultaneously. I did a relative search on the Web and > although I am aware of the C language as to a certain extent, I > struggle to find a model program. My initial advice would be to use Python instead of C. If you want to use C: man socket man select man poll man pthreads http://en.wikipedia.org/wiki/POSIX_Threads http://www.amazon.com/UNIX-Network-Programming-Richard-Stevens/dp/0139498761 http://www.amazon.com/Advanced-UNIX-Programming-2nd-Edition/dp/0131411543 -- Grant Edwards grant.b.edwards Yow! My mind is a potato at field ... gmail.com