Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Tcp Listener
Date: Mon, 03 Feb 2014 22:04:28
Message-Id: 52F01250.8030600@iinet.net.au
In Reply to: Re: [gentoo-user] Tcp Listener by xarman
1 On 04/02/14 05:51, xarman wrote:
2 >
3 > On 02/03/2014 11:43 PM, Alan McKinnon wrote:
4 >> On 03/02/2014 20:15, xarman wrote:
5 >>> I'm interested in making a TCP Listener in C / C++ on Linux to accept
6 >>> many connections simultaneously. I did a relative search on the Web and
7 >>> although I am aware of the C language as to a certain extent, I
8 >>> struggle to find a model program. Essentially, it is the listener of a
9 >>> server that receives a signal and stores it in a database and do some
10 >>> other functions. I know how to do the functions but I'm looking for a
11 >>> way to fix the basic skeleton of listener that will be always active.
12 >>> I'm not sure if I need multi threading or multi socketing for multi
13 >>> connections.
14 >>> If you have any knowledge on the subject or have a simple example or even
15 >>> some reference in order to work on that, I'd appreciate it.
16 >>>
17 >>>
18 >>
19 >>
20 >> Is this a school homework question?
21 >>
22 >>
23 >>
24 > No. Why are you asking?
25 >
26
27 He is asking because its one of the common C/C++ computer science
28 assignments!
29
30 In practice, perl, python are usually simpler and easier to use.
31
32 and the google-fu needed is to search for a TCP echo server to use as a
33 staring point.
34
35 BillK

Replies

Subject Author
Re: [gentoo-user] Tcp Listener Xar Man <manousidis.xar@×××××.com>