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 19438138B43 for ; Thu, 6 Feb 2014 11:09:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AFFC2E0B58; Thu, 6 Feb 2014 11:09:00 +0000 (UTC) Received: from mail-wg0-f65.google.com (mail-wg0-f65.google.com [74.125.82.65]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77579E0B46 for ; Thu, 6 Feb 2014 11:08:59 +0000 (UTC) Received: by mail-wg0-f65.google.com with SMTP id y10so270234wgg.4 for ; Thu, 06 Feb 2014 03:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Rvpkpm2SgFDeyeDWNI+dpQeAQL5sGqoAN53zujOOaoU=; b=thS6lCEM+mEvJ2JcIfmOp61DSnE6AHERvi8OmEUdE6deFTC8yTmgh913/11K1Cp6Sv jBvAbliCR61tuyuXXmhNLD1MsLaOj0wiO4R7+WY4RwYLa6dlZSjtllBlbw42dQnyLBYh X1HZOaI2/Zgu1WvTAwoMKyZczSeNqiqbqvmR+1x4Z+JE9Fs4l4J9j1b6LhXnqRa1cLME B8qMAoEGW77g8xeMXWgWtpZdgCUaJLfb9T/2iOCO/t4V8OgBJEcIaeIAGQcadntKh7zo MgbKygkwq4lUBZPR7ecEIG6WkWgnBsmnzTAjEu0XhxwEhoJr2/x32WJaybPdo1Oft1pZ 1nkw== 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 MIME-Version: 1.0 X-Received: by 10.180.105.41 with SMTP id gj9mr20798390wib.28.1391684937969; Thu, 06 Feb 2014 03:08:57 -0800 (PST) Received: by 10.194.62.82 with HTTP; Thu, 6 Feb 2014 03:08:57 -0800 (PST) In-Reply-To: <52EFDCB4.5040106@gmail.com> References: <52EFDCB4.5040106@gmail.com> Date: Thu, 6 Feb 2014 19:08:57 +0800 Message-ID: Subject: Re: [gentoo-user] Tcp Listener From: =?GB2312?B?x67U88mt?= To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=f46d044282625df5cf04f1bae6b6 X-Archives-Salt: 3edb9f7b-1ade-4415-a142-da65c367e64d X-Archives-Hash: d9565d89a2ecfb8b1a7b1fc3414b0cad --f46d044282625df5cf04f1bae6b6 Content-Type: text/plain; charset=ISO-8859-1 Maybe I miss your problem.But there is a command line program names 'netcat', which can send/receive TCP/UDP messages. also would be nice to check its source code if you are interested to writing your own. 2014-02-04 xarman : > 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. Essentially, it is the listener of a > server that receives a signal and stores it in a database and do some > other functions. I know how to do the functions but I'm looking for a > way to fix the basic skeleton of listener that will be always active. > I'm not sure if I need multi threading or multi socketing for multi > connections. > If you have any knowledge on the subject or have a simple example or even > some reference in order to work on that, I'd appreciate it. > > --f46d044282625df5cf04f1bae6b6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Maybe I miss your problem.But there is a command line prog= ram names 'netcat', which can send/receive TCP/UDP messages. also w= ould be nice to check its source code if you are interested to writing your= own.


2014-02= -04 xarman <manousidis.xar@gmail.com>:
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. Essentially, it is the listener of a
server that receives a signal and stores it in a database and do some
other functions. I know how to do the functions but I'm looking for a way to fix the basic skeleton of listener that will be always active.
I'm not sure if I need multi threading or multi socketing for multi
connections.
If you have any knowledge on the subject or have a simple example or even some reference in order to work on that, I'd appreciate it.


--f46d044282625df5cf04f1bae6b6--