From MAILER-DAEMON Fri Sep 05 05:26:33 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19vCpu-0006W5-2X
	for mharc-bug-commoncpp@gnu.org; Fri, 05 Sep 2003 05:24:58 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19uwqs-0000uL-4c
	for bug-commoncpp@gnu.org; Thu, 04 Sep 2003 12:20:54 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19uwop-0008Dp-5k
	for bug-commoncpp@gnu.org; Thu, 04 Sep 2003 12:18:49 -0400
Received: from [192.42.124.30] (helo=huygens.rijnh.nl)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 19uwnU-0007eO-6T
	for bug-commoncpp@gnu.org; Thu, 04 Sep 2003 12:17:24 -0400
Received: from doze.rijnh.nl.fhi-berlin.mpg.de (dhcp124-254.rijnh.nl
	[192.42.124.254])
	by huygens.rijnh.nl (SGI-8.12.5/8.12.5) with ESMTP id h84GIFxX3005524
	for <bug-commoncpp@gnu.org>; Thu, 4 Sep 2003 18:18:15 +0200 (MET_DST)
To: bug-commoncpp@gnu.org
X-Archive: encrypt
X-Attribution: Jochen
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUcGRSqioSCPi7Cwbxu
	Vk5MQjycXkxMKiQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFG2qEAAAB5klEQVR42nXUwY7aMBAA
	UK8E4tqpI/fMKIWzFdBewcwm10WA9tpksz6zFci/37GdxF7a+mLwi2fGQ4yo/jPE9AkaIcRM/gU7
	EcfTA/zgtWsuEfRmWPVjlsOryMYpAYgvYz9B8RXmhxHEw/gcQD+sz/cDbMLXhbu7a6j6Nob6FuDW
	U21+uje8nuUA/rnXxR4ArCWi5jhWJSJUmoWop7HckPt+Bz6PsrYmexgg5HY3CDvKuq/lAM9hB4VQ
	HfZEMt8xj2BLSrD1cDlThNJMoXSEWnroDJr3HM5nDtUbRIPuluDqLlx8YdYuh0o87S6+DWANUrn+
	Pf0eO7vh1Awf98XKXi/jAatnCwU/Bebl5pZqjRNs2xa4IcoqdEuN5QSbFn3pYLkqqbtyLLfSEbQi
	XEn4jsvpZRiAO7UCUCYBhE7zhAgSclAyToiSO5xgA+8RONYqD6X3YYdWnakJU1WVPsaI0LXU5VBF
	kMr6aJTBPk4KfP5SJoAYEXpE5/4FVnVrpHQ/tny/pAduZl/bBDsGLbkqD7ZN0PgbCfwucPL49gzd
	pZmPw22SoPoc+iZkAL+J6nRrdQEHf+4Qqm4TFJJ8idxYrumY/QEAFHQI65xhcZqgOEHhTAhk6WUu
	jgPohnc4wgD21+zN+c79AZmNym6Cgz4IAAAAAElFTkSuQmCC
X-URL: http://jochen-kuepper.de
User-Agent: Gnus v5.10.3
From: =?iso-8859-1?q?Jochen_K=FCpper?= <jochen@jochen-kuepper.de>
Organization: FHI Berlin & FOM Rijnhuizen
Date: Thu, 04 Sep 2003 18:16:46 +0200
Message-ID: <86u17s5y1d.fsf@doze.rijnh.nl>
Lines: 57
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Fri, 05 Sep 2003 05:24:55 -0400
Subject: client/server application setup question
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: jochen@jochen-kuepper.de
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2003 16:21:22 -0000

Dear All,

I am trying to write a client--server data acquisition application,
where client and server need not to be running on the same host. The
server is planned to be multithreaded, the client might (or might not)
become mt at some point.

I would like to use the Common C++ abstractions for sockets, threads,
and such and I have looked through and modified some of the examples.
Nevertheless I am not sure where to look for information. (I know the
demos, the introduction, and the doxygen generated docs.)

I would like to have a server that listens on a fixed port (let's say
4000) for connections. On an incoming connection it will read the data
send, which is only a few bytes to determine which handler [1] of the
server is necessary. It determines an unused port (let's say 4003),
starts an appropriate (detached) thread listening on that port, sends
the port number back to the client, and goes back to listen on the
original port (4000).

At the same time the newly created server-thread listens on port 4003
for more data and then reacts accordingly. At some point the client
tells the server-thread that is done and the server-thread will shut
itself down.

Obviously the server has to keep listening on the original port
"forever" and acts as kind of a thread-starter. The multiple (many)
such "secondary" threads should run (quasi-)parallel and will listen
on different ports at the same time.

Looking through the examples it seemed to me that tcpthread.cpp is a
good start and so I went ahead from there. Nevertheless I don't seem
to get it working correctly. I use TCPSession derived classes for the
server threads, but it seems that different threads or sockets are
blocking each other.[2]

I would appreciate any feedback on my ideas, suggestions for
improvements, or simply pointers to additional information or better
places to ask.

Thank you all in advance.

Greetings,
Jochen

Footnotes:=20
[1]  A handler could be a device driver, a "database server", or any
     other entity that can be controlled or from which data can be
     requested. Each "backend" should have it's own thread running in
     the server.
[2]  I will post code as soon as it is simple enough and I have at
     least a idea of what is exactly going wrong.
--=20
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Libert=E9, =C9galit=E9, Fraternit=E9                GnuPG key: CC1B0B4D
        Sex, drugs and rock-n-roll





From MAILER-DAEMON Mon Sep 08 17:23:11 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19wTQQ-0000Uu-4O
	for mharc-bug-commoncpp@gnu.org; Mon, 08 Sep 2003 17:19:54 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19wSPa-0005K2-7Q
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 16:14:58 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19wSOp-0004x4-DZ
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 16:14:12 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19wSNG-0004H0-Mo
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 16:12:35 -0400
Received: from [146.193.0.232] (helo=weenie.inesc.pt)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19wSHO-0006Ww-Mu
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 16:06:31 -0400
Received: from Shaolin (shaolin [172.16.4.84])
	by weenie.inesc.pt (8.9.3/8.9.3) with SMTP id TAA05284
	for <bug-commoncpp@gnu.org>; Mon, 8 Sep 2003 19:09:03 +0100
Message-ID: <001801c37634$cfeabbb0$540410ac@Shaolin>
From: "Rui Maia" <rfpm@mega.ist.utl.pt>
To: "CommonC++" <bug-commoncpp@gnu.org>
Date: Mon, 8 Sep 2003 19:12:49 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0015_01C3763D.31A33CD0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Mailman-Approved-At: Mon, 08 Sep 2003 17:19:31 -0400
Subject: <features.h> not found... can't compile in windows2000
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Rui Maia <rfpm@mega.ist.utl.pt>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Sep 2003 20:21:31 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C3763D.31A33CD0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm having this problem... I compile the library and the extensions with =
XML disabled... I install them, but when i try to compile my program...

u:\commoncpp2-1.0.13\include\cc++\config.h(388) : fatal error C1083: =
Cannot open include file: 'features.h': No such file or directory

...i see that this file is for linux/unix not for windows... so... how =
can i resolve this problem ?

thank you

Rui Maia
**********
EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
WEB:   http://mega.ist.utl.pt/~rfpm
*****************************************
------=_NextPart_000_0015_01C3763D.31A33CD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>I'm having =
this problem...=20
I compile the library and the extensions with XML disabled... I install =
them,=20
but when i try to compile my program...</FONT></DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>u:\commoncpp2-1.0.13\include\cc++\config.h(388) :=20
fatal error C1083: Cannot open include file: 'features.h': No such file =
or=20
directory</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>...i see that this file is for =
linux/unix not for=20
windows... so... how can i resolve this problem ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thank you</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rui Maia<BR>**********<BR>EMAIL: <A=20
href=3D"mailto:rfpm@mega.ist.utl.pt">rfpm@mega.ist.utl.pt</A>&nbsp;&nbsp;=
 <A=20
href=3D"mailto:Rui.Maia@l2f.inesc-id.pt">Rui.Maia@l2f.inesc-id.pt</A><BR>=
WEB:&nbsp;&nbsp;=20
<A=20
href=3D"http://mega.ist.utl.pt/~rfpm">http://mega.ist.utl.pt/~rfpm</A><BR=
>*****************************************</FONT></DIV></BODY></HTML>

------=_NextPart_000_0015_01C3763D.31A33CD0--





From MAILER-DAEMON Mon Sep 08 17:23:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19wTQ9-0000O8-Vs
	for mharc-bug-commoncpp@gnu.org; Mon, 08 Sep 2003 17:19:37 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19wQUg-0003f2-TU
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:12:06 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19wQTa-0002Gv-PB
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:11:01 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19wQRS-0000st-TH
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:08:46 -0400
Received: from [146.193.0.232] (helo=weenie.inesc.pt)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19wQPR-0007Ib-2J
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:06:41 -0400
Received: from Shaolin (shaolin [172.16.4.84])
	by weenie.inesc.pt (8.9.3/8.9.3) with SMTP id RAA04103
	for <bug-commoncpp@gnu.org>; Mon, 8 Sep 2003 17:47:22 +0100
Message-ID: <000801c37629$663cc060$540410ac@Shaolin>
From: "Rui Maia" <rfpm@mega.ist.utl.pt>
To: <bug-commoncpp@gnu.org>
Date: Mon, 8 Sep 2003 17:51:07 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0005_01C37631.C7937270"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Mailman-Approved-At: Mon, 08 Sep 2003 17:19:24 -0400
Subject: <features.h> not found... can't compile in windows2000
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Rui Maia <rfpm@mega.ist.utl.pt>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Sep 2003 18:17:23 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C37631.C7937270
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm having this problem... I compile the library and the extensions with =
XML disabled... I install them, but when i try to compile my program...

u:\commoncpp2-1.0.13\include\cc++\config.h(388) : fatal error C1083: =
Cannot open include file: 'features.h': No such file or directory

...i see that this file is for linux/unix not for windows... so... how =
can i resolve this problem ?

thank you

Rui Maia
**********
EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
WEB:   http://mega.ist.utl.pt/~rfpm
*****************************************
------=_NextPart_000_0005_01C37631.C7937270
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I'm having this problem... I compile =
the library=20
and the extensions with XML disabled... I install them, but when i try =
to=20
compile my program...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>u:\commoncpp2-1.0.13\include\cc++\config.h(388) :=20
fatal error C1083: Cannot open include file: 'features.h': No such file =
or=20
directory</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>...i see that this file is for =
linux/unix not for=20
windows... so... how can i resolve this problem ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thank you</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Rui Maia<BR>**********<BR>EMAIL: <A=20
href=3D"mailto:rfpm@mega.ist.utl.pt">rfpm@mega.ist.utl.pt</A>&nbsp;&nbsp;=
 <A=20
href=3D"mailto:Rui.Maia@l2f.inesc-id.pt">Rui.Maia@l2f.inesc-id.pt</A><BR>=
WEB:&nbsp;&nbsp;=20
<A=20
href=3D"http://mega.ist.utl.pt/~rfpm">http://mega.ist.utl.pt/~rfpm</A><BR=
>*****************************************</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C37631.C7937270--





From MAILER-DAEMON Mon Sep 08 17:31:25 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19wTQ6-0000Iy-4i
	for mharc-bug-commoncpp@gnu.org; Mon, 08 Sep 2003 17:19:34 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19wQU2-0002kH-7W
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:11:26 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19wQSu-0001hY-2j
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:10:17 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19wQRR-0000qp-BK
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:08:45 -0400
Received: from [146.193.0.232] (helo=weenie.inesc.pt)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19wQPN-0007Ib-Ly
	for bug-commoncpp@gnu.org; Mon, 08 Sep 2003 14:06:38 -0400
Received: from Shaolin (shaolin [172.16.4.84])
	by weenie.inesc.pt (8.9.3/8.9.3) with SMTP id SAA04466
	for <bug-commoncpp@gnu.org>; Mon, 8 Sep 2003 18:10:10 +0100
Message-ID: <000c01c3762c$95f6bd80$540410ac@Shaolin>
From: "Rui Maia" <rfpm@mega.ist.utl.pt>
To: "CommonC++" <bug-commoncpp@gnu.org>
Date: Mon, 8 Sep 2003 18:13:56 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0009_01C37634.F7B3F990"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Mailman-Approved-At: Mon, 08 Sep 2003 17:19:24 -0400
Subject: <features.h> not found... can't compile in windows2000
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Rui Maia <rfpm@mega.ist.utl.pt>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 08 Sep 2003 18:11:39 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C37634.F7B3F990
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm having this problem... I compile the library and the extensions with =
XML disabled... I install them, but when i try to compile my program...

u:\commoncpp2-1.0.13\include\cc++\config.h(388) : fatal error C1083: =
Cannot open include file: 'features.h': No such file or directory

...i see that this file is for linux/unix not for windows... so... how =
can i resolve this problem ?

thank you

Rui Maia
**********
EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
WEB:   http://mega.ist.utl.pt/~rfpm
*****************************************
------=_NextPart_000_0009_01C37634.F7B3F990
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>I'm having this problem... I compile =
the library=20
and the extensions with XML disabled... I install them, but when i try =
to=20
compile my program...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>u:\commoncpp2-1.0.13\include\cc++\config.h(388) :=20
fatal error C1083: Cannot open include file: 'features.h': No such file =
or=20
directory</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>...i see that this file is for =
linux/unix not for=20
windows... so... how can i resolve this problem ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thank you</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Rui Maia<BR>**********<BR>EMAIL: <A=20
href=3D"mailto:rfpm@mega.ist.utl.pt">rfpm@mega.ist.utl.pt</A>&nbsp;&nbsp;=
 <A=20
href=3D"mailto:Rui.Maia@l2f.inesc-id.pt">Rui.Maia@l2f.inesc-id.pt</A><BR>=
WEB:&nbsp;&nbsp;=20
<A=20
href=3D"http://mega.ist.utl.pt/~rfpm">http://mega.ist.utl.pt/~rfpm</A><BR=
>*****************************************</FONT></DIV></BODY></HTML>

------=_NextPart_000_0009_01C37634.F7B3F990--





From MAILER-DAEMON Tue Sep 09 05:20:25 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19week-00084e-UZ
	for mharc-bug-commoncpp@gnu.org; Tue, 09 Sep 2003 05:19:26 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19weef-00080h-Nh
	for bug-commoncpp@gnu.org; Tue, 09 Sep 2003 05:19:21 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19weeZ-0007xD-Rg
	for bug-commoncpp@gnu.org; Tue, 09 Sep 2003 05:19:16 -0400
Received: from [62.96.239.30] (helo=mail.freiverkehr.de)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 19weeC-0007eW-AX
	for bug-commoncpp@gnu.org; Tue, 09 Sep 2003 05:18:52 -0400
Received: from cproch.freiverkehr.de (CPROCH [10.100.102.211]) by
	mail.freiverkehr.de with SMTP (Microsoft Exchange Internet Mail
	Service Version 5.5.2653.13)
	id RLGM98NV; Tue, 9 Sep 2003 11:18:49 +0200
From: "Prochnow, Christian" <cproch@freiverkehr.de>
Organization: Berliner Freiverkehr AG
To: bug-commoncpp@gnu.org
Date: Tue, 9 Sep 2003 11:18:32 +0200
User-Agent: KMail/1.5
References: <200308281922.37561.cproch@seculogix.de>
In-Reply-To: <200308281922.37561.cproch@seculogix.de>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: clearsigned data
Content-Disposition: inline
Message-Id: <200309091118.32496.cproch@freiverkehr.de>
Subject: Re: Deadlock on Win32 with SocketPort/SocketService
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Sep 2003 09:19:24 -0000

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag, 28. August 2003 19:22 schrieb Christian Prochnow:
> Hi List,
>
> i got some dead-locking problem on Win32 using the SocketService/SocketPo=
rt
> classes.
> When attaching many SocketPort's (eg when multiple connections are pending
> on the listening socket) to a SocketService the application sometimes
> dead-locks in Sync::update(). This problem does not occur on Linux where
> another Syncronization mechanism is used.
> Any ideas ?
>
> Regards,
> Christian Prochnow
>

Ok,=20
thanx for the support that doesn't happen on this mailing list. I'm really=
=20
frustrated with commoncpp2 and rewrote every project that used commoncpp2 t=
o=20
use my own one: P::Classes (http://pclasses.com).=20
The code in commoncpp2 looks awfull and is full of bugs !!

Best regards,
Christian Prochnow

=2D --=20
Berliner Freiverkehr (Aktien) AG - Kurf=FCrstendamm 119 - 10711 Berlin
Telefon: +49-30-89606-409 - Fax: +49-30-89021-389
Email: cproch@freiverkehr.de - Internet: http://www.freiverkehr.de
PGP: F197 D4C1 E231 925D 6DF8 9E46 73FB C070 FC94 0552

=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/XZroc/vAcPyUBVIRAvJYAJ9oYwy2Ty4OTZfCegJUN7uGr2SMJACgpVRj
SAsFlIjriCKys3IbQiNcFnk=3D
=3DJpX9
=2D----END PGP SIGNATURE-----




From MAILER-DAEMON Fri Sep 12 07:24:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19xm2h-0002Sm-5h
	for mharc-bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:24:47 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19xm2c-0002Op-8s
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:24:42 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19xm1r-000251-C2
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:23:56 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19xm1D-0001nB-Nw
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:23:15 -0400
Received: from [153.1.1.45] (helo=rehuapila.uta.fi)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19xm0T-0008NN-76
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:22:29 -0400
Received: from neliapila.uta.fi (neliapila.uta.fi [153.1.1.43])
	by rehuapila.uta.fi (8.12.9/8.12.9) with ESMTP id h8CBMQFn008831
	for <bug-commoncpp@gnu.org>; Fri, 12 Sep 2003 14:22:26 +0300 (EEST)
Received: from apila.uta.fi (localhost.localdomain [127.0.0.1])
	by neliapila.uta.fi (8.12.9/8.12.9) with ESMTP id h8CBMQKF015428
	for <bug-commoncpp@gnu.org>; Fri, 12 Sep 2003 14:22:26 +0300
Received: from uta.fi (grey-1.cs.uta.fi [153.1.55.31])
	by apila.uta.fi (8.12.9/8.12.9) with ESMTP id h8CBMPpK008970
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <bug-commoncpp@gnu.org>; Fri, 12 Sep 2003 14:22:26 +0300 (EEST)
Message-ID: <3F61AC7F.9070800@uta.fi>
Date: Fri, 12 Sep 2003 14:22:39 +0300
From: Toni Vanhala <Toni.Vanhala@uta.fi>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.4a) Gecko/20030401
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Problems building on Win32
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Sep 2003 11:24:44 -0000

Hello!

I've tried many approaches to build the CommonC++ library on a Windows
platform (Cygwin, Borland, MSYS&MinGW), without much success. If there
is a simple way to build it, please let me know, and disregard the rest
of this message. Or, if there is a precompiled version somewhere that
WOULD be nice :-)

The most success (at least, in my opinion) I've had with MSYS 1.0.9 and
MinGW 3.0.0-1. BTW, I compiled the libxml2 from 2.5.9 source.

I ran ./configure, modified some of the source (dir.cpp, socket.h,
port.cpp, config.h, among others), and it now seems to compile with the
makefile in 'src'-directory.

However, among the output it states that:

/bin/sh ../libtool --mode=link g++ -I../src -DCCXX_EXPORT_LIBRARY
-I/usr/local/include/libxml2 -I../win32 -g -O2 -I/usr/local/include
-D_GNU_SOURCE   -o libccgnu2.la -rpath /usr/local/lib -version-info 0:11
-release 1.0 thread.lo mutex.lo semaphore.lo threadkey.lo friends.lo
event.lo slog.lo dir.lo file.lo inaddr.lo peer.lo port.lo socket.lo
network.lo serial.lo mempager.lo keydata.lo dso.lo exception.lo
process.lo urlstring.lo getopt.lo getopt1.lo  -L/usr/local/lib
libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
shared libraries


The libccgnu2.la and libccgnu2.a (+libext2) files appear, but I cannot
compile the examples in 'demo'-directory, e.g.
gcc -I/usr/local/include/cc++2 -g -O2 -I/usr/local/include -D_GNU_SOURCE
-L/usr/local/lib -lccgnu2 -lccext2 -lz -shared serialecho.cpp
results in several 'undefined references' to definitions in ost and std
namespaces.

I have run the libtool with -no-undefined -flag. The result is undefined
references to Win32 functions and types, such as WSASocketA, closesocket
and inet_addr. The references are from the files inaddr.cpp, socket.h,
peer.cpp, port.cpp, socket.cpp and network.cpp.


I've already spent two weeks on this, so I appreciate every help you can
  give me! Thanks,

Toni Vanhala





From MAILER-DAEMON Fri Sep 12 09:05:01 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19xnbg-0002yT-SB
	for mharc-bug-commoncpp@gnu.org; Fri, 12 Sep 2003 09:05:00 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19xmQK-0007gw-Ji
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:49:12 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19xmQH-0007gC-Vg
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:49:10 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19xmQH-0007Wm-E9
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:49:09 -0400
Received: from [146.193.0.232] (helo=weenie.inesc.pt)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19xm2O-00007Q-I3
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 07:24:28 -0400
Received: from Shaolin (shaolin [172.16.4.84])
	by weenie.inesc.pt (8.9.3/8.9.3) with SMTP id MAA11006
	for <bug-commoncpp@gnu.org>; Fri, 12 Sep 2003 12:23:58 +0100
Message-ID: <000801c37920$e86826c0$540410ac@Shaolin>
From: "Rui Maia" <rfpm@mega.ist.utl.pt>
To: "CommonC++" <bug-commoncpp@gnu.org>
Date: Fri, 12 Sep 2003 12:27:53 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0005_01C37929.49F5A040"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Mailman-Approved-At: Fri, 12 Sep 2003 09:04:59 -0400
Subject: Cannot open include file: 'net/if.h': No such file or directory
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Rui Maia <rfpm@mega.ist.utl.pt>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Sep 2003 11:49:14 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C37929.49F5A040
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I can't compile in windows2000 because of this error:

u:\commonc++-1.9.7\src\url.h(47) : fatal error C1083: Cannot open =
include file: 'net/if.h': No such file or directory

Any help ?

thank you

Rui Maia
**********
EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
WEB:   http://mega.ist.utl.pt/~rfpm
*****************************************
------=_NextPart_000_0005_01C37929.49F5A040
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I can't compile in windows2000 because =
of this=20
error:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>u:\commonc++-1.9.7\src\url.h(47) : =
fatal error=20
C1083: Cannot open include file: 'net/if.h': No such file or=20
directory</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any help ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thank you</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Rui Maia<BR>**********<BR>EMAIL: <A=20
href=3D"mailto:rfpm@mega.ist.utl.pt">rfpm@mega.ist.utl.pt</A>&nbsp;&nbsp;=
 <A=20
href=3D"mailto:Rui.Maia@l2f.inesc-id.pt">Rui.Maia@l2f.inesc-id.pt</A><BR>=
WEB:&nbsp;&nbsp;=20
<A=20
href=3D"http://mega.ist.utl.pt/~rfpm">http://mega.ist.utl.pt/~rfpm</A><BR=
>*****************************************</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C37929.49F5A040--





From MAILER-DAEMON Fri Sep 12 09:05:02 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19xnbi-0002zF-7Y
	for mharc-bug-commoncpp@gnu.org; Fri, 12 Sep 2003 09:05:02 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19xmtG-0002l3-OK
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 08:19:06 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19xmtD-0002jt-Lt
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 08:19:04 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19xmtC-0002hd-QQ
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 08:19:02 -0400
Received: from [152.78.70.1] (helo=raven.ecs.soton.ac.uk)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19xmt5-00052O-Tb
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 08:19:00 -0400
Received: from crow.ecs.soton.ac.uk (crow.ecs.soton.ac.uk [152.78.71.3])
	by raven.ecs.soton.ac.uk (8.9.3/8.9.3) with ESMTP id NAA07855;
	Fri, 12 Sep 2003 13:18:20 +0100 (BST)
Received: from wlan-118.ecs.soton.ac.uk (wlan-118 [152.78.190.149])
	by crow.ecs.soton.ac.uk (8.9.3p2/8.9.3) with ESMTP id NAA02085;
	Fri, 12 Sep 2003 13:18:12 +0100 (BST)
From: Jon Wilson <jdw100@ecs.soton.ac.uk>
To: Toni Vanhala <Toni.Vanhala@uta.fi>
In-Reply-To: <3F61AC7F.9070800@uta.fi>
References: <3F61AC7F.9070800@uta.fi>
Content-Type: text/plain
Message-Id: <1063369091.14061.8.camel@Laptop.ecs.soton.ac.uk>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.4-5mdk 
Date: Fri, 12 Sep 2003 13:18:12 +0100
Content-Transfer-Encoding: 7bit
X-MailScanner-Information: Please contact helpdesk@ecs.soton.ac.uk for more
	information
X-ECS-MailScanner: Found to be clean
X-Mailman-Approved-At: Fri, 12 Sep 2003 09:04:59 -0400
Cc: bug-commoncpp@gnu.org
Subject: Re: Problems building on Win32
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Sep 2003 12:19:08 -0000

I would try building with MingW, that is what I used last year sometime.
The WSA stuff sounds like winsock stuff missing from the linking. Try
linking wsock32.dll, ws2_32.dll and possibly others from the windows
directory. These are almost certainly parts of windows that are missing
in the linking process. I am be able to dig out a dll for 1.0.8 (but
that had issues with thread.join() which I had to hack by hand), but I
don't have it here. You should have no problems building it though, if
you get the linking done.

Try just google.com for dll and the symbol missing if the two dlls above
don't help. They should be kicking around in c:\windows\system or
c:\windows\system32 though.

Best of Luck

Jon Wilson
 

On Fri, 2003-09-12 at 12:22, Toni Vanhala wrote:
> Hello!
> 
> I've tried many approaches to build the CommonC++ library on a Windows
> platform (Cygwin, Borland, MSYS&MinGW), without much success. If there
> is a simple way to build it, please let me know, and disregard the rest
> of this message. Or, if there is a precompiled version somewhere that
> WOULD be nice :-)
> 
> The most success (at least, in my opinion) I've had with MSYS 1.0.9 and
> MinGW 3.0.0-1. BTW, I compiled the libxml2 from 2.5.9 source.
> 
> I ran ./configure, modified some of the source (dir.cpp, socket.h,
> port.cpp, config.h, among others), and it now seems to compile with the
> makefile in 'src'-directory.
> 
> However, among the output it states that:
> 
> /bin/sh ../libtool --mode=link g++ -I../src -DCCXX_EXPORT_LIBRARY
> -I/usr/local/include/libxml2 -I../win32 -g -O2 -I/usr/local/include
> -D_GNU_SOURCE   -o libccgnu2.la -rpath /usr/local/lib -version-info 0:11
> -release 1.0 thread.lo mutex.lo semaphore.lo threadkey.lo friends.lo
> event.lo slog.lo dir.lo file.lo inaddr.lo peer.lo port.lo socket.lo
> network.lo serial.lo mempager.lo keydata.lo dso.lo exception.lo
> process.lo urlstring.lo getopt.lo getopt1.lo  -L/usr/local/lib
> libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
> shared libraries
> 
> 
> The libccgnu2.la and libccgnu2.a (+libext2) files appear, but I cannot
> compile the examples in 'demo'-directory, e.g.
> gcc -I/usr/local/include/cc++2 -g -O2 -I/usr/local/include -D_GNU_SOURCE
> -L/usr/local/lib -lccgnu2 -lccext2 -lz -shared serialecho.cpp
> results in several 'undefined references' to definitions in ost and std
> namespaces.
> 
> I have run the libtool with -no-undefined -flag. The result is undefined
> references to Win32 functions and types, such as WSASocketA, closesocket
> and inet_addr. The references are from the files inaddr.cpp, socket.h,
> peer.cpp, port.cpp, socket.cpp and network.cpp.
> 
> 
> I've already spent two weeks on this, so I appreciate every help you can
>   give me! Thanks,
> 
> Toni Vanhala
> 
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Fri Sep 12 10:17:11 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19xojW-00020U-RW
	for mharc-bug-commoncpp@gnu.org; Fri, 12 Sep 2003 10:17:10 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19xoaj-000506-OW
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 10:08:05 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19xoaf-0004zi-T4
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 10:08:02 -0400
Received: from [205.188.157.33] (helo=imo-d01.mx.aol.com)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 19xoaf-0004zU-KR
	for bug-commoncpp@gnu.org; Fri, 12 Sep 2003 10:08:01 -0400
Received: from gyohng@netscape.net
	by imo-d01.mx.aol.com (mail_out_v36_r1.1.) id 7.1f.a5e0976 (22683)
	for <bug-commoncpp@gnu.org>; Fri, 12 Sep 2003 10:07:57 -0400 (EDT)
Received: from netscape.net (mow-m28.webmail.aol.com [64.12.137.5]) by
	air-in04.mx.aol.com (v95.13) with ESMTP id
	MAILININ44-589b3f61d33c29; Fri, 12 Sep 2003 10:07:57 -0400
Date: Fri, 12 Sep 2003 10:07:56 -0400
From: gyohng@netscape.net (George Yohng)
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Message-ID: <67BD1DB4.7BECC78E.000653A4@netscape.net>
X-Mailer: Atlas Mailer 2.0
X-AOL-IP: 217.215.63.61
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mailman-Approved-At: Fri, 12 Sep 2003 10:17:08 -0400
Subject: URLStream sock;
	.... if (!sock)  ---> ambiguous operator!() --> Socket/istream
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Sep 2003 14:08:06 -0000

When an URLStream is declared and one would want to check it against being valid with operator!, compiler error is issued.

conversion to bool works allright.

URLStream sock;

if (!sock) -----> fails during compilation

if (!(bool)sock) --------> works

One has to add this operator explicitly to URLStream, I guess.

Otherwise, lowercase tcpstream implements this operator, is it that there should be lowercase urlstream also?

Thanks,
George.


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455



From MAILER-DAEMON Sun Sep 14 13:09:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19yaNI-0003jV-89
	for mharc-bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:09:24 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19yaNF-0003ip-7m
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:09:21 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19yaND-0003iJ-EM
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:09:20 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19yaND-0003hh-3E
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:09:19 -0400
Received: from [141.153.202.198] (helo=localhost.bayonne.dyndns.org)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19yaMq-0002qk-8K
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:08:56 -0400
Received: from 192.168.1.104 ([192.168.1.104])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8EIA3xt032517; Sun, 14 Sep 2003 14:10:03 -0400
From: David Sugar <dyfet@ostel.com>
To: gyohng@netscape.net (George Yohng), bug-commoncpp@gnu.org
Date: Sun, 14 Sep 2003 13:15:37 -0400
User-Agent: KMail/1.5
References: <67BD1DB4.7BECC78E.000653A4@netscape.net>
In-Reply-To: <67BD1DB4.7BECC78E.000653A4@netscape.net>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309141315.37445.dyfet@ostel.com>
Cc: 
Subject: Re: URLStream sock;
	.... if (!sock)  ---> ambiguous operator!() --> Socket/istream
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Sep 2003 17:09:21 -0000

The lowercase streams came into existance because the original Common C++ ones 
behaved differently in some ways from their std C++ counterparts.  Hence, 
TCPStream is different in some ways from related things like "fstream" in 
it's behavior, where "tcpstream" would presumably be closer to the same 
behavior.  The main difference is that Common C++ objects throw their own 
exception class family and that they do not have a seperate "open" method 
since this is normally done in the constructor directly.  Should there be a 
urlstream?

On Friday 12 September 2003 10:07 am, George Yohng wrote:
> When an URLStream is declared and one would want to check it against being
> valid with operator!, compiler error is issued.
>
> conversion to bool works allright.
>
> URLStream sock;
>
> if (!sock) -----> fails during compilation
>
> if (!(bool)sock) --------> works
>
> One has to add this operator explicitly to URLStream, I guess.
>
> Otherwise, lowercase tcpstream implements this operator, is it that there
> should be lowercase urlstream also?
>
> Thanks,
> George.
>
>
> __________________________________________________________________
> McAfee VirusScan Online from the Netscape Network.
> Comprehensive protection for your entire computer. Get your free trial
> today!
> http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>
> Get AOL Instant Messenger 5.1 free of charge.  Download Now!
> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Sun Sep 14 13:13:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19yaRC-0006Qa-Mw
	for mharc-bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:13:26 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19yaRA-0006Pk-Cn
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:13:24 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19yaR8-0006P2-GI
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:13:22 -0400
Received: from [141.153.202.198] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19yaR7-0006Oc-St
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:13:22 -0400
Received: from 192.168.1.104 ([192.168.1.104])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8EIESxt032528; Sun, 14 Sep 2003 14:14:28 -0400
From: David Sugar <dyfet@ostel.com>
To: bug-commoncpp@gnu.org
Date: Sun, 14 Sep 2003 13:20:02 -0400
User-Agent: KMail/1.5
MIME-Version: 1.0
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309141320.02670.dyfet@ostel.com>
Cc: cplusplus-devel@lists.sourceforge.net
Subject: CVS merged
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Sep 2003 17:13:25 -0000

Last week, we merged 1.0.x with cvs head, which should bring cvs current with 
a lot of the subtler 1.0.x bugfixes, and which should also make cvs head 
usable on macosx.  Code was also added to enable auditing of deadlocks 
through mutexes by enabling debugging messages and naming mutex objects.  
Presumably, 1.1.0 will be the next Common C++ release, and will be based on 
Common C++ cvs head, rather than on the current "RELEASE1" tree.




From MAILER-DAEMON Sun Sep 14 13:17:22 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19yaUu-0000qz-8P
	for mharc-bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:17:16 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19yaUr-0000oz-UW
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:17:13 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19yaUp-0000n2-Qp
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:17:12 -0400
Received: from [141.153.202.198] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19yaUo-0000kt-Px
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 13:17:11 -0400
Received: from 192.168.1.104 ([192.168.1.104])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8EIHixt032539; Sun, 14 Sep 2003 14:17:45 -0400
From: David Sugar <dyfet@ostel.com>
To: Jon Wilson <jdw100@ecs.soton.ac.uk>, Toni Vanhala <Toni.Vanhala@uta.fi>
Date: Sun, 14 Sep 2003 13:23:19 -0400
User-Agent: KMail/1.5
References: <3F61AC7F.9070800@uta.fi>
	<1063369091.14061.8.camel@Laptop.ecs.soton.ac.uk>
In-Reply-To: <1063369091.14061.8.camel@Laptop.ecs.soton.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309141323.19505.dyfet@ostel.com>
Cc: bug-commoncpp@gnu.org
Subject: Re: Problems building on Win32
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Sep 2003 17:17:14 -0000

Yes, there is a link dependency on wsock32 in Common C++.  If you are building 
under mingw32, you should have coff copies built up of these, and you should 
be able to simply use -lwock32 and such to get those extra library references 
to resolve.

On Friday 12 September 2003 08:18 am, Jon Wilson wrote:
> I would try building with MingW, that is what I used last year sometime.
> The WSA stuff sounds like winsock stuff missing from the linking. Try
> linking wsock32.dll, ws2_32.dll and possibly others from the windows
> directory. These are almost certainly parts of windows that are missing
> in the linking process. I am be able to dig out a dll for 1.0.8 (but
> that had issues with thread.join() which I had to hack by hand), but I
> don't have it here. You should have no problems building it though, if
> you get the linking done.
>
> Try just google.com for dll and the symbol missing if the two dlls above
> don't help. They should be kicking around in c:\windows\system or
> c:\windows\system32 though.
>
> Best of Luck
>
> Jon Wilson
>
> On Fri, 2003-09-12 at 12:22, Toni Vanhala wrote:
> > Hello!
> >
> > I've tried many approaches to build the CommonC++ library on a Windows
> > platform (Cygwin, Borland, MSYS&MinGW), without much success. If there
> > is a simple way to build it, please let me know, and disregard the rest
> > of this message. Or, if there is a precompiled version somewhere that
> > WOULD be nice :-)
> >
> > The most success (at least, in my opinion) I've had with MSYS 1.0.9 and
> > MinGW 3.0.0-1. BTW, I compiled the libxml2 from 2.5.9 source.
> >
> > I ran ./configure, modified some of the source (dir.cpp, socket.h,
> > port.cpp, config.h, among others), and it now seems to compile with the
> > makefile in 'src'-directory.
> >
> > However, among the output it states that:
> >
> > /bin/sh ../libtool --mode=link g++ -I../src -DCCXX_EXPORT_LIBRARY
> > -I/usr/local/include/libxml2 -I../win32 -g -O2 -I/usr/local/include
> > -D_GNU_SOURCE   -o libccgnu2.la -rpath /usr/local/lib -version-info 0:11
> > -release 1.0 thread.lo mutex.lo semaphore.lo threadkey.lo friends.lo
> > event.lo slog.lo dir.lo file.lo inaddr.lo peer.lo port.lo socket.lo
> > network.lo serial.lo mempager.lo keydata.lo dso.lo exception.lo
> > process.lo urlstring.lo getopt.lo getopt1.lo  -L/usr/local/lib
> > libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
> > shared libraries
> >
> >
> > The libccgnu2.la and libccgnu2.a (+libext2) files appear, but I cannot
> > compile the examples in 'demo'-directory, e.g.
> > gcc -I/usr/local/include/cc++2 -g -O2 -I/usr/local/include -D_GNU_SOURCE
> > -L/usr/local/lib -lccgnu2 -lccext2 -lz -shared serialecho.cpp
> > results in several 'undefined references' to definitions in ost and std
> > namespaces.
> >
> > I have run the libtool with -no-undefined -flag. The result is undefined
> > references to Win32 functions and types, such as WSASocketA, closesocket
> > and inet_addr. The references are from the files inaddr.cpp, socket.h,
> > peer.cpp, port.cpp, socket.cpp and network.cpp.
> >
> >
> > I've already spent two weeks on this, so I appreciate every help you can
> >   give me! Thanks,
> >
> > Toni Vanhala
> >
> >
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > Bug-commoncpp@gnu.org
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Sun Sep 14 14:00:26 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19ybAf-0005cW-H0
	for mharc-bug-commoncpp@gnu.org; Sun, 14 Sep 2003 14:00:25 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19ybAc-0005Zn-Gd
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 14:00:22 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19ybAa-0005Y9-OZ
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 14:00:21 -0400
Received: from [141.153.202.198] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19ybAa-0005Y4-Ba
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 14:00:20 -0400
Received: from 192.168.1.104 ([192.168.1.104])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8EJ1Qxt000326; Sun, 14 Sep 2003 15:01:27 -0400
From: David Sugar <dyfet@ostel.com>
To: Rui Maia <rfpm@mega.ist.utl.pt>, "CommonC++" <bug-commoncpp@gnu.org>
Date: Sun, 14 Sep 2003 14:07:00 -0400
User-Agent: KMail/1.5
References: <000801c37920$e86826c0$540410ac@Shaolin>
In-Reply-To: <000801c37920$e86826c0$540410ac@Shaolin>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309141407.00911.dyfet@ostel.com>
Cc: 
Subject: Re: Cannot open include file: 'net/if.h': No such file or directory
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Sep 2003 18:00:23 -0000

Common C++ "1" was depreciated last year.  This should be fixed in Common C++ 
"2".

On Friday 12 September 2003 07:27 am, Rui Maia wrote:
> I can't compile in windows2000 because of this error:
>
> u:\commonc++-1.9.7\src\url.h(47) : fatal error C1083: Cannot open include
> file: 'net/if.h': No such file or directory
>
> Any help ?
>
> thank you
>
> Rui Maia
> **********
> EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
> WEB:   http://mega.ist.utl.pt/~rfpm
> *****************************************




From MAILER-DAEMON Sun Sep 14 16:19:40 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19ydLP-0006O3-UA
	for mharc-bug-commoncpp@gnu.org; Sun, 14 Sep 2003 16:19:39 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19ydLN-0006N4-9l
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 16:19:37 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19ydLK-0006M0-FX
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 16:19:35 -0400
Received: from [141.153.202.198] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19ydLJ-0006LD-5n
	for bug-commoncpp@gnu.org; Sun, 14 Sep 2003 16:19:33 -0400
Received: from 192.168.1.104 ([192.168.1.104])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8ELKaxt032214; Sun, 14 Sep 2003 17:20:37 -0400
From: David Sugar <dyfet@ostel.com>
To: Rui Maia <rfpm@mega.ist.utl.pt>, "CommonC++" <bug-commoncpp@gnu.org>
Date: Sun, 14 Sep 2003 16:26:11 -0400
User-Agent: KMail/1.5
References: <000c01c3762c$95f6bd80$540410ac@Shaolin>
In-Reply-To: <000c01c3762c$95f6bd80$540410ac@Shaolin>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309141626.11356.dyfet@ostel.com>
Cc: 
Subject: Re: <features.h> not found... can't compile in windows2000
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 14 Sep 2003 20:19:38 -0000

For win32 with visual studio, you should not run ./configure.  There is a 
pre-built config.h with the correct macro settings for use with Microsoft's 
build tools and compiler already in win32/cc++/config.h.

On Monday 08 September 2003 01:13 pm, Rui Maia wrote:
> I'm having this problem... I compile the library and the extensions with
> XML disabled... I install them, but when i try to compile my program...
>
> u:\commoncpp2-1.0.13\include\cc++\config.h(388) : fatal error C1083: Cannot
> open include file: 'features.h': No such file or directory
>
> ...i see that this file is for linux/unix not for windows... so... how can
> i resolve this problem ?
>
> thank you
>
> Rui Maia
> **********
> EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
> WEB:   http://mega.ist.utl.pt/~rfpm
> *****************************************




From MAILER-DAEMON Tue Sep 16 07:39:16 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 19zEAu-0005Qz-4s
	for mharc-bug-commoncpp@gnu.org; Tue, 16 Sep 2003 07:39:16 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 19zBJW-0005qw-80
	for bug-commoncpp@gnu.org; Tue, 16 Sep 2003 04:35:58 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 19zBJU-0005q8-0o
	for bug-commoncpp@gnu.org; Tue, 16 Sep 2003 04:35:56 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 19zBJT-0005os-Kf
	for bug-commoncpp@gnu.org; Tue, 16 Sep 2003 04:35:55 -0400
Received: from [64.235.234.100] (helo=orion.lunarpages.com)
	by mx20.gnu.org with esmtp (Exim 4.22) id 19zBId-0007SY-Gg
	for bug-commoncpp@gnu.org; Tue, 16 Sep 2003 04:35:03 -0400
Received: from cpanel by orion.lunarpages.com with local (Exim 4.20)
	id 19zBKu-0000yl-4B
	for bug-commoncpp@gnu.org; Tue, 16 Sep 2003 01:37:24 -0700
Received: from 148.240.146.58 ([148.240.146.58]) 
	by orion.lunarpages.com (IMP) with HTTP 
	for <edgar@presentame.com@localhost>; Tue, 16 Sep 2003 01:37:23 -0700
Message-ID: <1063701443.3f66cbc3e7f16@orion.lunarpages.com>
Date: Tue, 16 Sep 2003 01:37:23 -0700
From: edgar@presentame.com
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.2.1
X-Originating-IP: 148.240.146.58
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - orion.lunarpages.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [32001 502] / [47 12]
X-AntiAbuse: Sender Address Domain - presentame.com
X-Mailman-Approved-At: Tue, 16 Sep 2003 07:39:14 -0400
Subject: Client SampleSocketService
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Sep 2003 08:35:59 -0000

FROM: edgar@presentame.com
------------------------------------------------------
Hello ! 

  I worked to do a Client Version of the SampleSocketServer demo from Common C++

Bu I have a serius dude about: I realy do a good job?

Te basic Idea is change TCPSocket by Socket.

Apply this technique, work very well in a real program, 
I control de creation of only one client... 
but I see (top command) a lot of CPU usage, from client connections, 
and I can't undestand why. I can't idetifiy a point to insert a 
Thread::yield() in order to minimize the CPU usage but I can't found that !!!

Please any can Help my !

Full files can be found in 

   www.presentame.com/ccpp
============================================
diff originalSampleSocketPort.h  clientVersionSampleSocketPorth
-------------------------------------------

24c24
< 	SampleSocketPort(SocketService *pService, TCPSocket & tcpSocket);
---
> 	SampleSocketPort(SocketService *pService, const InetHostAddress& ih, 
tpport_t port);
137c137
< class SampleSocketServiceServer :  public virtual TCPSocket, public virtual 
Thread
---
> class SampleSocketServiceServer :  public virtual Socket, public virtual 
Thread
140,141c140,141
< 	SampleSocketServiceServer(InetHostAddress & machine, int port) :
< 					TCPSocket(machine, port), Thread(), 
m_bQuitServer(true)
---
> 	SampleSocketServiceServer(InetHostAddress & machine, tpport_t port) :
> 	  Socket(AF_INET,SOCK_STREAM), Thread(), m_bQuitServer(true), m_port
(port), m_machine(machine)
162c162
< 				CreateSocketPort(m_pSocketService, *((TCPSocket 
*)this));
---
> 				CreateSocketPort(m_pSocketService, m_machine, 
m_port);
176c176
< 	virtual SocketPort *CreateSocketPort(SocketService *pService, TCPSocket 
& Socket) = 0;
---
> 	virtual SocketPort *CreateSocketPort(SocketService *pService, 
InetHostAddress& machine, tpport_t port) = 0;
208a209,210
> 	tpport_t m_port;
> 	InetHostAddress m_machine;


===========================================
diff originalSampleSocketPort.cpp  clientVersionSampleSocketPort.cpp
-------------------------------------------
50,51c50,54
< SampleSocketPort::SampleSocketPort(SocketService *pService, TCPSocket & 
tcpSocket) : 
< 				SocketPort(pService, tcpSocket)
---
> /**
>  *
>  */
> SampleSocketPort::SampleSocketPort(SocketService* svc, const InetHostAddress& 
ih, tpport_t port):
>   ost::SocketPort( svc, ih,port)
53c56
< 	tpport_t port;
---
> 
290,291c293,294
< 	ReverserPort(SocketService *pService, TCPSocket & tcpSocket) : 
< 			SampleSocketPort(pService, tcpSocket)
---
> 	ReverserPort(SocketService *pService, const InetHostAddress& ih, 
tpport_t port):
> 			SampleSocketPort(pService, ih, port)
334,335c337,338
< 	ReverserServer(InetHostAddress & machine, int port) : 
< 			SampleSocketServiceServer(machine, port), TCPSocket
(machine, port), Thread()
---
> 	ReverserServer(InetHostAddress & machine, tpport_t port) : 
> 			SampleSocketServiceServer(machine, port), Socket
(AF_INET,SOCK_STREAM), Thread()
341c344
< 	virtual SocketPort *CreateSocketPort(SocketService *pService, TCPSocket 
& Socket)
---
> 	virtual SocketPort *CreateSocketPort(SocketService *pService, 
InetHostAddress & machine, tpport_t port)
343c346
< 		return(new ReverserPort(pService, Socket));
---
> 		return(new ReverserPort(pService, machine, port));


-------------------------------------------------
Thanks !!!!!!!!
FROM: edgar@presentame.com






From MAILER-DAEMON Sun Sep 21 23:18:45 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A1HDp-0007iW-F7
	for mharc-bug-commoncpp@gnu.org; Sun, 21 Sep 2003 23:18:45 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A1AVz-0007Xu-Jg
	for bug-commoncpp@gnu.org; Sun, 21 Sep 2003 16:09:03 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A1AVw-0007Xk-4B
	for bug-commoncpp@gnu.org; Sun, 21 Sep 2003 16:09:02 -0400
Received: from [144.92.197.183] (helo=smtp3.doit.wisc.edu)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 1A1AVv-0007Xg-Ry
	for bug-commoncpp@gnu.org; Sun, 21 Sep 2003 16:08:59 -0400
Received: from conversion-daemon.smtp3.doit.wisc.edu by smtp3.doit.wisc.edu
	(iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003))
	id <0HLK00H01YJ5X7@smtp3.doit.wisc.edu> for bug-commoncpp@gnu.org; Sun,
	21 Sep 2003 15:08:57 -0500 (CDT)
Received: from wi.rr.com ([146.151.108.24])
	by smtp3.doit.wisc.edu (iPlanet Messaging Server 5.2 HotFix 1.18 (built
	Jul 28 2003)) with ESMTP id <0HLK00HEXYMXAE@smtp3.doit.wisc.edu> for
	bug-commoncpp@gnu.org; Sun, 21 Sep 2003 15:08:57 -0500 (CDT)
Date: Sun, 21 Sep 2003 15:08:57 -0500
From: ajstone <ajstone@wi.rr.com>
To: bug-commoncpp@gnu.org
Message-id: <6ECE988E-EC6F-11D7-8822-000A956F6C9A@wi.rr.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.552)
Content-type: text/plain; format=flowed; charset=US-ASCII
Content-transfer-encoding: 7BIT
X-Mailman-Approved-At: Sun, 21 Sep 2003 23:18:44 -0400
Subject: Mac OSX make
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 21 Sep 2003 20:09:04 -0000

Commoncpp developers,

I am trying to build Commoncpp 2 on OSX with GCC 3.1.  It fails during 
the make with the following:

ld -r -o ccgnu2.lo thread.lo mutex.lo semaphore.lo threadkey.lo 
friends.lo event.lo slog.lo dir.lo file.lo inaddr.lo peer.lo port.lo 
socket.lo network.lo serial.lo mempager.lo keydata.lo dso.lo 
exception.lo process.lo urlstring.lo getopt.lo getopt1.lo
ld: thread.lo bad magic number (not a Mach-O file)
ld: mutex.lo bad magic number (not a Mach-O file)
ld: semaphore.lo bad magic number (not a Mach-O file)
ld: threadkey.lo bad magic number (not a Mach-O file)
ld: friends.lo bad magic number (not a Mach-O file)
ld: event.lo bad magic number (not a Mach-O file)
ld: slog.lo bad magic number (not a Mach-O file)
ld: dir.lo bad magic number (not a Mach-O file)
ld: file.lo bad magic number (not a Mach-O file)
ld: inaddr.lo bad magic number (not a Mach-O file)
ld: peer.lo bad magic number (not a Mach-O file)
ld: port.lo bad magic number (not a Mach-O file)
ld: socket.lo bad magic number (not a Mach-O file)
ld: network.lo bad magic number (not a Mach-O file)
ld: serial.lo bad magic number (not a Mach-O file)
ld: mempager.lo bad magic number (not a Mach-O file)
ld: keydata.lo bad magic number (not a Mach-O file)
ld: dso.lo bad magic number (not a Mach-O file)
ld: exception.lo bad magic number (not a Mach-O file)
ld: process.lo bad magic number (not a Mach-O file)
ld: urlstring.lo bad magic number (not a Mach-O file)
ld: getopt.lo bad magic number (not a Mach-O file)
ld: getopt1.lo bad magic number (not a Mach-O file)

What is wrong with my ld to cause this?  Also reporting this as a bug.

Full GCC version string: gcc (GCC) 3.1 20020420 (prerelease)
OS: Darwin 6.6/OS 10.2.6




From MAILER-DAEMON Sun Sep 21 23:52:23 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A1HkM-0002At-PK
	for mharc-bug-commoncpp@gnu.org; Sun, 21 Sep 2003 23:52:22 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A1HkK-0002Aj-6G
	for bug-commoncpp@gnu.org; Sun, 21 Sep 2003 23:52:20 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A1HkH-0002AY-Ru
	for bug-commoncpp@gnu.org; Sun, 21 Sep 2003 23:52:18 -0400
Received: from [141.153.192.197] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A1HkH-0002AV-0f
	for bug-commoncpp@gnu.org; Sun, 21 Sep 2003 23:52:17 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8M4n84J024088; Mon, 22 Sep 2003 00:49:08 -0400
From: David Sugar <dyfet@ostel.com>
To: ajstone <ajstone@wi.rr.com>, bug-commoncpp@gnu.org
Date: Sun, 21 Sep 2003 23:59:56 -0400
User-Agent: KMail/1.5
References: <6ECE988E-EC6F-11D7-8822-000A956F6C9A@wi.rr.com>
In-Reply-To: <6ECE988E-EC6F-11D7-8822-000A956F6C9A@wi.rr.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309212359.56918.dyfet@ostel.com>
Cc: 
Subject: Re: Mac OSX make
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 22 Sep 2003 03:52:21 -0000

I generally have built Common C++ on a macosx machine with gcc 3.1, and macosx 
10.2.x.  Common C++ does a second stage link because there is a bug in the 
way macosx handles c++ shared libraries that stretch over multiple object 
modules; it fails to run constructors for embedded objects (statically 
initialized classes) if they are spread out over multiple object modules when 
the library is loaded.  The second stage link sticks the seperate object 
modules into a single object module.  It seems, on your machine, that second 
stage link is failing.

I would suggest doing a "rm libtool" and removing the configure support files 
from the "config" subdirectory, and then runn ./reconfig and re-run 
./configure and then "make clean".  This will build a new configure script 
and use the version of libtool provided on macosx.  I suspect the default 
libtool used in later distributions (which is what normally is distributed in 
the tarball) are in some way no longer compatible; perhaps it is using 
invalid compile options for building macosx shared objects.  I generally test 
and build on macosx right from cvs (using ./reconfig to build configure 
locally on macosx) rather than from the dist tarballs.

On Sunday 21 September 2003 04:08 pm, ajstone wrote:
> Commoncpp developers,
>
> I am trying to build Commoncpp 2 on OSX with GCC 3.1.  It fails during
> the make with the following:
>
> ld -r -o ccgnu2.lo thread.lo mutex.lo semaphore.lo threadkey.lo
> friends.lo event.lo slog.lo dir.lo file.lo inaddr.lo peer.lo port.lo
> socket.lo network.lo serial.lo mempager.lo keydata.lo dso.lo
> exception.lo process.lo urlstring.lo getopt.lo getopt1.lo
> ld: thread.lo bad magic number (not a Mach-O file)
> ld: mutex.lo bad magic number (not a Mach-O file)
> ld: semaphore.lo bad magic number (not a Mach-O file)
> ld: threadkey.lo bad magic number (not a Mach-O file)
> ld: friends.lo bad magic number (not a Mach-O file)
> ld: event.lo bad magic number (not a Mach-O file)
> ld: slog.lo bad magic number (not a Mach-O file)
> ld: dir.lo bad magic number (not a Mach-O file)
> ld: file.lo bad magic number (not a Mach-O file)
> ld: inaddr.lo bad magic number (not a Mach-O file)
> ld: peer.lo bad magic number (not a Mach-O file)
> ld: port.lo bad magic number (not a Mach-O file)
> ld: socket.lo bad magic number (not a Mach-O file)
> ld: network.lo bad magic number (not a Mach-O file)
> ld: serial.lo bad magic number (not a Mach-O file)
> ld: mempager.lo bad magic number (not a Mach-O file)
> ld: keydata.lo bad magic number (not a Mach-O file)
> ld: dso.lo bad magic number (not a Mach-O file)
> ld: exception.lo bad magic number (not a Mach-O file)
> ld: process.lo bad magic number (not a Mach-O file)
> ld: urlstring.lo bad magic number (not a Mach-O file)
> ld: getopt.lo bad magic number (not a Mach-O file)
> ld: getopt1.lo bad magic number (not a Mach-O file)
>
> What is wrong with my ld to cause this?  Also reporting this as a bug.
>
> Full GCC version string: gcc (GCC) 3.1 20020420 (prerelease)
> OS: Darwin 6.6/OS 10.2.6
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




From MAILER-DAEMON Tue Sep 23 03:35:00 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A1hhM-00080F-2B
	for mharc-bug-commoncpp@gnu.org; Tue, 23 Sep 2003 03:35:00 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A1hhJ-0007zk-I7
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 03:34:57 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A1hhH-0007zR-Md
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 03:34:56 -0400
Received: from [64.235.234.100] (helo=orion.lunarpages.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A1hhE-0007yy-C6
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 03:34:52 -0400
Received: from cpanel by orion.lunarpages.com with local (Exim 4.20)
	id 1A1hhg-0002PF-6c
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 00:35:20 -0700
Received: from 148.240.200.67 ([148.240.200.67]) 
	by orion.lunarpages.com (IMP) with HTTP 
	for <edgar@presentame.com@localhost>; Tue, 23 Sep 2003 00:35:20 -0700
Message-ID: <1064302520.3f6ff7b829839@orion.lunarpages.com>
Date: Tue, 23 Sep 2003 00:35:20 -0700
From: edgar@presentame.com
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.2.1
X-Originating-IP: 148.240.200.67
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - orion.lunarpages.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [32001 502] / [47 12]
X-AntiAbuse: Sender Address Domain - presentame.com
Subject: (no subject)
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Sep 2003 07:34:58 -0000

Hello ! 

  I worked to do a Client Version of the 
SampleSocketServer demo from Common C++
But I have a serius dude about: I realy do a good job?

Te basic Idea is change TCPSocket by Socket.

Apply this technique, work very well in a real program, 
<<< Currently I control de creation of only one client...>>> 

but I see a lot of CPU usage, 
(
   just like a while(true){} cycle
   without a Thread::yield()
   inside the cicle
) 
from client connections, 

and I can't undestand why. I can't idetifiy a point to insert a 
Thread::yield(), or a sleep(int) call in order to minimize 
the CPU usage. 

I can't found that !!!


Please any one can Help my !

Simple examples and compiled files can be found in :

   http://www.presentame.com/ccpp

Here are DE DIFFERENCES BETWEN SampleSocketPort.cpp (from
example distribution) and my client version: 
============================================
diff originalSampleSocketPort.h  clientVersionSampleSocketPorth
-------------------------------------------

24c24
< 	SampleSocketPort(SocketService *pService, TCPSocket & tcpSocket);
---
> 	SampleSocketPort(SocketService *pService, const InetHostAddress& ih, 
tpport_t port);
137c137
< class SampleSocketServiceServer :  public virtual TCPSocket, public virtual 
Thread
---
> class SampleSocketServiceServer :  public virtual Socket, public virtual 
Thread
140,141c140,141
< 	SampleSocketServiceServer(InetHostAddress & machine, int port) :
< 					TCPSocket(machine, port), Thread(), 
m_bQuitServer(true)
---
> 	SampleSocketServiceServer(InetHostAddress & machine, tpport_t port) :
> 	  Socket(AF_INET,SOCK_STREAM), Thread(), m_bQuitServer(true), m_port
(port), m_machine(machine)
162c162
< 				CreateSocketPort(m_pSocketService, *((TCPSocket *)
this));
---
> 				CreateSocketPort(m_pSocketService, m_machine, m_port);
176c176
< 	virtual SocketPort *CreateSocketPort(SocketService *pService, TCPSocket 
& Socket) = 0;
---
> 	virtual SocketPort *CreateSocketPort(SocketService *pService, 
InetHostAddress& machine, tpport_t port) = 0;
208a209,210
> 	tpport_t m_port;
> 	InetHostAddress m_machine;


===========================================
diff originalSampleSocketPort.cpp  clientVersionSampleSocketPort.cpp
-------------------------------------------
50,51c50,54
< SampleSocketPort::SampleSocketPort(SocketService *pService, TCPSocket & 
tcpSocket) : 
< 				SocketPort(pService, tcpSocket)
---
> /**
>  *
>  */
> SampleSocketPort::SampleSocketPort(SocketService* svc, const InetHostAddress& 
ih, tpport_t port):
>   ost::SocketPort( svc, ih,port)
53c56
< 	tpport_t port;
---
> 
290,291c293,294
< 	ReverserPort(SocketService *pService, TCPSocket & tcpSocket) : 
< 			SampleSocketPort(pService, tcpSocket)
---
> 	ReverserPort(SocketService *pService, const InetHostAddress& ih, 
tpport_t port):
> 			SampleSocketPort(pService, ih, port)
334,335c337,338
< 	ReverserServer(InetHostAddress & machine, int port) : 
< 			SampleSocketServiceServer(machine, port), TCPSocket
(machine, port), Thread()
---
> 	ReverserServer(InetHostAddress & machine, tpport_t port) : 
> 			SampleSocketServiceServer(machine, port), Socket
(AF_INET,SOCK_STREAM), Thread()
341c344
< 	virtual SocketPort *CreateSocketPort(SocketService *pService, TCPSocket 
& Socket)
---
> 	virtual SocketPort *CreateSocketPort(SocketService *pService, 
InetHostAddress & machine, tpport_t port)
343c346
< 		return(new ReverserPort(pService, Socket));
---
> 		return(new ReverserPort(pService, machine, port));


-------------------------------------------------
Thanks !!!!!!!!
FROM: edgar@presentame.com





From MAILER-DAEMON Tue Sep 23 18:54:20 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A1w32-0003tw-LL
	for mharc-bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:54:20 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A1w30-0003tP-4V
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:54:18 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A1w2x-0003sZ-0u
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:54:15 -0400
Received: from [199.232.41.8] (helo=mx20.gnu.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A1w2n-0003rt-BW
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:54:05 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by mx20.gnu.org with esmtp (Exim 4.22) id 1A1w1V-0004y6-AD
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:52:45 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8NMqafn005084
	for <bug-commoncpp@gnu.org>; Tue, 23 Sep 2003 15:52:38 -0700
Message-Id: <200309232252.h8NMqafn005084@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
X-KMail-Redirect-From: Mike Papper <m.papper@fantastic.com>
From: Mike Papper <m.papper@fantastic.com> (by way of Mike Papper
	<m.papper@fantastic.com>)
Date: Tue, 23 Sep 2003 15:52:25 -0700
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Common CPP Classes for EventHandler Classes
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Sep 2003 22:54:19 -0000

I have been looking at Common CPP for use in scaling our distributed system.
I want to use what is termed an "EventHandler" (from the SEDA project at
http://www.eecs.harvard.edu/~mdw/proj/seda/ ). The event handler is a Queue
and some number of threads that process items from the queue. It is used as a
component for event handling/message passing in a server.

I would like to create 2 types of "event handlers" and was wondering
someone with CommonCPP experience could give me feedback on what CPP classes
would be appropriate to combine together?

1) Message Processing Handler: input queue of Message objects and a pool of
threads that process the messages. Threads wait on the queue and when a queue
item is added, one thread wakes up and processes the message. Then the thread
goes back to waiting on the queue.

I would think this maps to the Buffer class (as described in the Threads.h
file). I am unclear as to how to subclass this and how to tie in some
pre-allocated threads.

Also, when we shutdown the process, can we easily tell these pooled threads
to stop and go away for a cleaner shutdown? I.e., if we join on these threads
but they are blocked on a semaphore, they wont join.

2) Socket Class: we have 1500 HTTP connections to this server. We will have a
number of instances of the Socket class to read data (but not to write data)
from these connections. We want to use a small number of threads to handle
the large number (1500) socket instances. And we want these small number of
threads to read efficiently.

Possible solutions for the Socket Class Event Handler:

1) I am looking at using non-blocking I/O and simply running down the list of
sockets non by one- can this be done with the Socket class?

2) select or poll: I have heard that using unix select or poll with 1500
items is bad (the list is too long). So, I was going to break it into a list 
of 200 items and a number of threads to reach the 1500. Will the Socket class 
allow me to do this or do I need to call poll or select directly 
myself?

3) I could have one thread per socket to read the data, process
all the messages, send data back and then keep reading (using keep-alive on
the socket).

4) Ideally a small number of threads that collectivly wait on the large
number of sockets for data to read. Is this concept in any CommonCPP classes? 
If not, how would I add such a structure?

Any ideas on how to implement any of these (especially with CommonCPP
classes) would be appreciated.

Are there any set of classes or methods for efficient reading of
a large number of socket connections with a relativly few number of threads?

--------------------------------  FYI   -------------------------
Our System:
---------------
A central machine communicates with 1500 "edge" machines. Each edge machine
is similar and connects to the central machine via HTTP, sends some "message"
data and waits for "message" data in the HTTP reply. Then the HTTP connection
is finished and the edge machine immediatly starts a new HTTP connection.

We use HTTP from edge to center to go through firewalls. We have the edge
machine always connecting to the central machine because we want to send
messages from the center to the edge as well as edge to center (i.e., since
the edge must initiate the socket connection, it must connect to the central
machine to receive any messages).

The central machine processes messages which does things like update the
status information about an edge, possibly update some information in a SQL
database, take any queued messages for this edge and send in the HTTP reply.

Platform:
-----------
We are using red hat 9 which has the "new" better thread support from the 2.6
kernel backported into it. C++.  We have access to multi-cpu boxes with lots
of RAM - well 4 Gb anyway.I am wondering if anyone has experience using many
threads on this new red hat 9 platform?

--
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Tue Sep 23 18:57:10 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A1w5m-0004aZ-7S
	for mharc-bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:57:10 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A1w5j-0004Xp-Jn
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:57:07 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A1w5h-0004Wx-Vr
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:57:06 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A1w1R-0003li-Fo
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:52:41 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8NMqafm005084
	for <bug-commoncpp@gnu.org>; Tue, 23 Sep 2003 15:52:37 -0700
Message-Id: <200309232252.h8NMqafm005084@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
X-KMail-Redirect-From: Mike Papper <m.papper@fantastic.com>
From: Mike Papper <m.papper@fantastic.com> (by way of Mike Papper
	<m.papper@fantastic.com>)
Date: Tue, 23 Sep 2003 15:49:54 -0700
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Pass by Value for Classes
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Sep 2003 22:57:08 -0000

Hello, I was wondering if there what classes can safely and
efficiently be passed by value (i..e, into functions or put onto templated
containers).

Is there a general rule for determining this (such as, if it has a copy
constructor, its safe to use in pass-by-value)?

Is this possible for:

Socket,

Thread (I would assume not, thus we would stick pointers to thread objects
into a queue to manage them)

Synchronization classes like Mutex, AtomicLock, Semaphore, Event, Conditional
etc.

--
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Tue Sep 23 18:57:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A1w5x-0004fM-1P
	for mharc-bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:57:21 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A1w5m-0004b1-Ol
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:57:10 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A1w5j-0004Xv-PR
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:57:08 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A1w1R-0003lh-Fm
	for bug-commoncpp@gnu.org; Tue, 23 Sep 2003 18:52:41 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8NMqafl005084
	for <bug-commoncpp@gnu.org>; Tue, 23 Sep 2003 15:52:36 -0700
Message-Id: <200309232252.h8NMqafl005084@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
X-KMail-Redirect-From: Mike Papper <m.papper@fantastic.com>
From: Mike Papper <m.papper@fantastic.com> (by way of Mike Papper
	<m.papper@fantastic.com>)
Date: Tue, 23 Sep 2003 15:49:39 -0700
To: bug-commoncpp@gnu.org
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: New By Name
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Sep 2003 22:57:12 -0000

I would like the Java introspection functionality - or at least to be able to
create an instance of a class from its name. This would mean there is no need
for "Factories". I call this feature "new by name" because thats what is was
called in the "ThinkC" platform/language in the early 90s.

Has there been any discussion or ideas on a good way to do this? Again, in
the 90s we ported the ThinkC functionality to Windows and Solaris,HP,AIX. We
impemented this feature in C++ doing 3 things:
1) all classes inherited from a single base class (ThinkC and Java style)
2) Adding a macro to each header and source file that did some registration
stuff (so the name could be looked up ina  table to find the code to create
theobject)
3) forced the linker to link these object by explicitly declaring an instance
somewhere

An example on how to use it:
ChildClass cl = (ChildClass)new_by_name("Children_of_ChildClass");

--
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Wed Sep 24 03:07:22 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A23kA-0004tD-28
	for mharc-bug-commoncpp@gnu.org; Wed, 24 Sep 2003 03:07:22 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A23k7-0004pB-4V
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 03:07:19 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A23k4-0004oh-Na
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 03:07:17 -0400
Received: from [194.51.5.4] (helo=vulcain.delta.fr)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 1A23k3-0004kZ-Mr
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 03:07:15 -0400
Received: from hebe (hebe.delta.fr [194.51.5.11])
	by vulcain.delta.fr (8.12.6/8.12.6) with SMTP id h8O772Uu000749;
	Wed, 24 Sep 2003 09:07:03 +0200 (MET DST)
From: "Pierre Bacquet" <pbacquet@delta.fr>
To: <m.papper@fantastic.com>, <bug-commoncpp@gnu.org>
Date: Wed, 24 Sep 2003 09:11:33 +0200
Message-ID: <AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
In-Reply-To: <AF46271CABC7D51197330060086E49CC3E73E3@pluton1.delta.fr>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Spam-Score: 0 () 
X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)
Cc: 
Subject: RE: New By Name
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: pbacquet@delta.fr
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 07:07:19 -0000

Mike,

> I would like the Java introspection functionality - or at 
> least to be able to
> create an instance of a class from its name. This would mean 
> there is no need
> for "Factories". I call this feature "new by name" because 
> thats what is was
> called in the "ThinkC" platform/language in the early 90s.
> 
> Has there been any discussion or ideas on a good way to do 
> this? Again, in
> the 90s we ported the ThinkC functionality to Windows and 
> Solaris,HP,AIX. We
> impemented this feature in C++ doing 3 things:
> 1) all classes inherited from a single base class (ThinkC and 
> Java style)
> 2) Adding a macro to each header and source file that did 
> some registration
> stuff (so the name could be looked up ina  table to find the 
> code to create
> theobject)
> 3) forced the linker to link these object by explicitly 
> declaring an instance
> somewhere
> 
> An example on how to use it:
> ChildClass cl = (ChildClass)new_by_name("Children_of_ChildClass");

Take a look at the persistence engine. What it does may look like what
you want, since the persistence engine reads the class name from a stream
and then creates a brand new instance of the given class. The persistence
engine also uses registration macros, ...

There are some subtilities (it seems to me that the class name is written
only once and then only short class ids instance of the class name, ...)

HTH,

Pierre.




From MAILER-DAEMON Wed Sep 24 20:46:51 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2KHS-0007bp-Ds
	for mharc-bug-commoncpp@gnu.org; Wed, 24 Sep 2003 20:46:50 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2KHN-0007ax-6A
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 20:46:45 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2KHJ-0007Zz-5F
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 20:46:43 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2KHI-0007Zi-Pi
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 20:46:40 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8P0kdfl019659
	for <bug-commoncpp@gnu.org>; Wed, 24 Sep 2003 17:46:39 -0700
Message-Id: <200309250046.h8P0kdfl019659@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
From: Mike Papper <m.papper@fantastic.com>
Organization: Fantastic
To: bug-commoncpp@gnu.org
Date: Wed, 24 Sep 2003 17:46:32 -0700
X-Mailer: KMail [version 1.3.2]
References: <AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
In-Reply-To: <AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Can we Use fd from Socket Class
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 00:46:46 -0000

Is it possible to use the underlying unix socket file descriptor from the 
Socket class (running under linux)?

I would like to call "select" or "poll" on a set of sockets. I like the idea 
of using the Socket class but it seems to be hard to do what I want with the 
class - so I feel the need to take the fd and make system calls myself.

-- 
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Wed Sep 24 22:07:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2LXA-0005QQ-LV
	for mharc-bug-commoncpp@gnu.org; Wed, 24 Sep 2003 22:07:08 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2LX6-0005PA-PJ
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 22:07:04 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2LX5-0005Op-CI
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 22:07:03 -0400
Received: from [141.153.192.197] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2LX5-0005Og-0S
	for bug-commoncpp@gnu.org; Wed, 24 Sep 2003 22:07:03 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8P34C4J012010; Wed, 24 Sep 2003 23:04:12 -0400
From: David Sugar <dyfet@ostel.com>
To: Mike Papper <m.papper@fantastic.com>, bug-commoncpp@gnu.org
Date: Wed, 24 Sep 2003 22:15:00 -0400
User-Agent: KMail/1.5
References: <AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
	<200309250046.h8P0kdfl019659@mail.fantastic.com>
In-Reply-To: <200309250046.h8P0kdfl019659@mail.fantastic.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309242215.00150.dyfet@ostel.com>
Cc: 
Subject: Re: Can we Use fd from Socket Class
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 02:07:07 -0000

I think socket is the class I least use in my own work, which is kind of 
ironic; but mostly I work on telephony servers and related projects, such as 
Bayonne.

I think your right that the base socket class should have a "getSocket" inline 
that simply returns "so".  The socket handle is in effect the same (an 
integer value) on all supported platforms, so it's not like doing so will 
return a different kind of object on different platforms (like happens with 
low level file handles).  You could also create a derived class who's sole 
purpose is to provide a public method to access so or that has a "static" 
select or poll structure that all instances fill.  The latter offers some 
potential self management of select or poll lists...

On Wednesday 24 September 2003 08:46 pm, Mike Papper wrote:
> Is it possible to use the underlying unix socket file descriptor from the
> Socket class (running under linux)?
>
> I would like to call "select" or "poll" on a set of sockets. I like the
> idea of using the Socket class but it seems to be hard to do what I want
> with the class - so I feel the need to take the fd and make system calls
> myself.




From MAILER-DAEMON Thu Sep 25 05:15:00 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2SDD-0005ha-O6
	for mharc-bug-commoncpp@gnu.org; Thu, 25 Sep 2003 05:14:59 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2SDA-0005fB-Hv
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 05:14:56 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2SD8-0005eT-S1
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 05:14:55 -0400
Received: from [194.67.66.158] (helo=stalker)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2SCJ-0005DQ-Kv
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 05:14:03 -0400
Received: from mind.zone.stalker.mephi.ru (unknown [192.168.13.200])
	by stalker (Postfix) with ESMTP
	id 60D3E3B3; Thu, 25 Sep 2003 15:28:27 +0400 (MSD)
Date: Thu, 25 Sep 2003 13:13:45 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00) UNREG / CD5BF9353B3B7091
X-Priority: 3 (Normal)
Message-ID: <8187354906.20030925131345@dezcom.mephi.ru>
To: "Pierre Bacquet" <pbacquet@delta.fr>
In-Reply-To: <AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
References: <AF46271CABC7D51197330060086E49CC3E73E3@pluton1.delta.fr>
	<AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: base64
Cc: bug-commoncpp@gnu.org
Subject: Re[2]: New By Name
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 09:14:57 -0000

SGkgQWxsLg0KDQo+PiBJIHdvdWxkIGxpa2UgdGhlIEphdmEgaW50cm9zcGVjdGlvbiBmdW5j
dGlvbmFsaXR5IC0gb3IgYXQNCj4+IGxlYXN0IHRvIGJlIGFibGUgdG8NCj4+IGNyZWF0ZSBh
biBpbnN0YW5jZSBvZiBhIGNsYXNzIGZyb20gaXRzIG5hbWUuIFRoaXMgd291bGQgbWVhbiAN
Cj4+IHRoZXJlIGlzIG5vIG5lZWQNCj4+IGZvciAiRmFjdG9yaWVzIi4gSSBjYWxsIHRoaXMg
ZmVhdHVyZSAibmV3IGJ5IG5hbWUiIGJlY2F1c2UgDQoNCkZyb20gbXkgcG9pbnQgb2Ygdmll
dyB0aGUgbWFpbiBhZHZhbnRhZ2UgYW5kIHJlYXNvbiBmb3IgdXNpbmcNCiJGYWN0b3JpZXMi
IGlzIGhpZGluZyBmcm9tIGNsaWVudHMgcmVhbCBpbXBsZW1lbnRhdGlvbiBvZg0KcmVxdWVz
dGVkIGludGVyZmFjZXMuIEkuZS4gaWYgaSByZXF1ZXN0IGludGVyZmFjZSAnTG9nZ2VyIGZy
b20NCidMb2dnZXJGYWN0b3J5JywgaXQgZG9lcyBub3QgbWF0dGVyIGZvciBtZSwgd2hhdCB0
aGUgaW1wbGVtZW50YXRpb24gb2YNCnRoaXMgaW50ZXJmYWNlIC0gJ0ZpbGVMb2dnZXInLCAn
REJMb2dnZXInIG9yICdTTVRQTG9nZ2VyJy4NCkFuZCBpZiBpIGV4cGxpY2l0bHkgc3BlY2lm
eSBhIG5hbWUgb2YgY2xhc3MgLSBob3cgY2FuIGkgZm9yZ2V0IGFib3V0IGENCkZhY3Rvcmll
cz8NCg0KQW5kIHdoYXQgdGhlIG1vdGl2YXRpb24gZm9yIGltcGxlbWVudGluZyB0aGlzIEph
dmEgcmVmbGVjdGlvbiBBUEkgbGlrZQ0Kc3R1ZmY/DQoNCj4+IA0KPj4gQW4gZXhhbXBsZSBv
biBob3cgdG8gdXNlIGl0Og0KPj4gQ2hpbGRDbGFzcyBjbCA9IChDaGlsZENsYXNzKW5ld19i
eV9uYW1lKCJDaGlsZHJlbl9vZl9DaGlsZENsYXNzIik7DQoNClBCPiBUYWtlIGEgbG9vayBh
dCB0aGUgcGVyc2lzdGVuY2UgZW5naW5lLg0KDQpQQj4gVGhlcmUgYXJlIHNvbWUgc3VidGls
aXRpZXMgKGl0IHNlZW1zIHRvIG1lIHRoYXQgdGhlIGNsYXNzIG5hbWUgaXMgd3JpdHRlbg0K
UEI+IG9ubHkgb25jZSBhbmQgdGhlbiBvbmx5IHNob3J0IGNsYXNzIGlkcyBpbnN0YW5jZSBv
ZiB0aGUgY2xhc3MgbmFtZSwgLi4uKQ0KDQpZZXMsIHVzaW5nIHBlcnNpc3RlbnQgY29udGFp
bmVyIGlzIGEgZ29vZCBpZGVhLg0KQnV0IGltcGxlbWVudGluZyB0aGlzIGlzIGEgdmVyeSBj
b21wbGV4IHRhc2ssIGFuZCBwdXJjaGFzaW5nIGl0IGlzDQp2ZXJ5IGV4cGVuc2l2ZS4gQWxs
IHRoZSBtb3JlIGkgZG9uJ3Qga25vdyBnb29kIG9wZW4gc291cmNlIEMrKw0KcGVyc2lzdGVu
dCBjb250YWluZXIuIDooDQoNCkFuZCBvcGluaW9uIG9uIHRoaXMgcXVlc3Rpb24gaXMgdGhh
dCBpbiBjb21wbGV4IGNhc2VzIGlzIG9ubHkgb25lIHdheQ0KZm9yIG1ha2UgaW5zdGFuY2Vz
IG9mIGNsYXNzZXMgYnkgbmFtZSAtIHBlcnNpc3RlbnQgbGF5ZXIgaW4NCmFwcGxpY2F0aW9u
IG9mIHNvbWV0aGluZyBsaWtlIENPUkJBLg0KQW5kIGluIHNpbXBsZSBjYXNlcyBpdCBub3Qg
bmVjZXNzYXJ5LCBhbmQgY2FuIGJlIGltcGxlbWVudGVkIGJ5IG90aGVyIHdheXMuDQoNCi0t
IA0KQmVzdCByZWdhcmRzLA0KIEFuZHJleSAgICAgICAgICAgICAgICAgICAgICAgICAgICBt
YWlsdG86aWxmaXNAZGV6Y29tLm1lcGhpLnJ1DQo=




From MAILER-DAEMON Thu Sep 25 06:53:41 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2Tki-0006lD-Fs
	for mharc-bug-commoncpp@gnu.org; Thu, 25 Sep 2003 06:53:40 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2Tke-0006jj-LW
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 06:53:36 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2Tkc-0006j6-E1
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 06:53:35 -0400
Received: from [194.67.66.158] (helo=stalker)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2Tjw-0006eh-83
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 06:52:52 -0400
Received: from mind.zone.stalker.mephi.ru (unknown [192.168.13.200])
	by stalker (Postfix) with ESMTP
	id EE78A3B3; Thu, 25 Sep 2003 17:07:17 +0400 (MSD)
Date: Thu, 25 Sep 2003 14:52:32 +0400
From: Andrey Kulikov <ilfis@dezcom.mephi.ru>
X-Mailer: The Bat! (v2.00) UNREG / CD5BF9353B3B7091
X-Priority: 3 (Normal)
Message-ID: <19193281875.20030925145232@dezcom.mephi.ru>
To: Mike Papper <m.papper@fantastic.com>(by way of Mike Papper
	<m.papper@fantastic.com>)
In-Reply-To: <200309232252.h8NMqafn005084@mail.fantastic.com>
References: <200309232252.h8NMqafn005084@mail.fantastic.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: bug-commoncpp@gnu.org
Subject: Re: Common CPP Classes for EventHandler Classes
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Andrey Kulikov <ilfis@dezcom.mephi.ru>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 10:53:38 -0000

Hello Mike,

MP> I have been looking at Common CPP for use in scaling our distributed system.
MP> I want to use what is termed an "EventHandler" (from the SEDA project at
MP> http://www.eecs.harvard.edu/~mdw/proj/seda/ ). The event handler is a Queue
MP> and some number of threads that process items from the queue. It is used as a
MP> component for event handling/message passing in a server.

MP> I would like to create 2 types of "event handlers" and was wondering
MP> someone with CommonCPP experience could give me feedback on what CPP classes
MP> would be appropriate to combine together?

We have the same needs. And we have develop some framework for simple
writing 'client', which can connect to a 'server' and a server, which
can communicate with may 'clients' at the same time.
This framework contains mechanism for managing connections and
messages between clients and server. Of course, this based on
CommonC++ classes.
In the near future I'll prepare this for comfortable using by othe
peoples and put it in public access.


MP> 1) Message Processing Handler: input queue of Message objects and a pool of
MP> threads that process the messages. Threads wait on the queue and when a queue
MP> item is added, one thread wakes up and processes the message. Then the thread
MP> goes back to waiting on the queue.


MP> 2) Socket Class: we have 1500 HTTP connections to this server. We will have a

MP> 3) I could have one thread per socket to read the data, process
MP> all the messages, send data back and then keep reading (using keep-alive on
MP> the socket).


-- 
Best regards,
 Andrey                            mailto:ilfis@dezcom.mephi.ru




From MAILER-DAEMON Thu Sep 25 10:48:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2XPp-0003aL-5P
	for mharc-bug-commoncpp@gnu.org; Thu, 25 Sep 2003 10:48:21 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2XPl-0003ZK-Ma
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 10:48:17 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2XPi-0003Yt-2s
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 10:48:14 -0400
Received: from [141.153.192.197] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2X1N-0007IA-Ny
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 10:23:05 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8PFJa4J015197; Thu, 25 Sep 2003 11:19:38 -0400
From: David Sugar <dyfet@ostel.com>
To: Andrey Kulikov <ilfis@dezcom.mephi.ru>,
	Mike Papper <m.papper@fantastic.com>(by way of Mike Papper
	<m.papper@fantastic.com>)
Date: Thu, 25 Sep 2003 10:30:24 -0400
User-Agent: KMail/1.5
References: <200309232252.h8NMqafn005084@mail.fantastic.com>
	<19193281875.20030925145232@dezcom.mephi.ru>
In-Reply-To: <19193281875.20030925145232@dezcom.mephi.ru>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309251030.24183.dyfet@ostel.com>
Cc: bug-commoncpp@gnu.org
Subject: Re: Common CPP Classes for EventHandler Classes
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 14:48:19 -0000

If you hve something that is fairly generic and easy to abstract or apply to 
varied situations, right now would be a good time to look at incorporate that 
for the upcoming 1.1 release.

David

On Thursday 25 September 2003 06:52 am, Andrey Kulikov wrote:
> Hello Mike,
>
> MP> I have been looking at Common CPP for use in scaling our distributed
> system. MP> I want to use what is termed an "EventHandler" (from the SEDA
> project at MP> http://www.eecs.harvard.edu/~mdw/proj/seda/ ). The event
> handler is a Queue MP> and some number of threads that process items from
> the queue. It is used as a MP> component for event handling/message passing
> in a server.
>
> MP> I would like to create 2 types of "event handlers" and was wondering
> MP> someone with CommonCPP experience could give me feedback on what CPP
> classes MP> would be appropriate to combine together?
>
> We have the same needs. And we have develop some framework for simple
> writing 'client', which can connect to a 'server' and a server, which
> can communicate with may 'clients' at the same time.
> This framework contains mechanism for managing connections and
> messages between clients and server. Of course, this based on
> CommonC++ classes.
> In the near future I'll prepare this for comfortable using by othe
> peoples and put it in public access.
>
>
> MP> 1) Message Processing Handler: input queue of Message objects and a
> pool of MP> threads that process the messages. Threads wait on the queue
> and when a queue MP> item is added, one thread wakes up and processes the
> message. Then the thread MP> goes back to waiting on the queue.
>
>
> MP> 2) Socket Class: we have 1500 HTTP connections to this server. We will
> have a
>
> MP> 3) I could have one thread per socket to read the data, process
> MP> all the messages, send data back and then keep reading (using
> keep-alive on MP> the socket).




From MAILER-DAEMON Thu Sep 25 13:57:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2aMd-00027c-2v
	for mharc-bug-commoncpp@gnu.org; Thu, 25 Sep 2003 13:57:15 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2aEx-0000ZF-PC
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 13:49:19 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2aAx-00083d-EB
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 13:45:12 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2ZXA-000780-My
	for bug-commoncpp@gnu.org; Thu, 25 Sep 2003 13:04:05 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8PH35fn010565;
	Thu, 25 Sep 2003 10:03:08 -0700
Message-Id: <200309251703.h8PH35fn010565@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
From: Mike Papper <m.papper@fantastic.com>
Organization: Fantastic
To: Andrey Kulikov <ilfis@dezcom.mephi.ru>,
	"Pierre Bacquet" <pbacquet@delta.fr>
Date: Thu, 25 Sep 2003 10:02:42 -0700
X-Mailer: KMail [version 1.3.2]
References: <AF46271CABC7D51197330060086E49CC3E73E3@pluton1.delta.fr>
	<AF46271CABC7D51197330060086E49CC38E829@pluton1.delta.fr>
	<8187354906.20030925131345@dezcom.mephi.ru>
In-Reply-To: <8187354906.20030925131345@dezcom.mephi.ru>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Cc: bug-commoncpp@gnu.org
Subject: Re: Re[2]: New By Name
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 17:57:13 -0000

The main reasonm for new_by_name (as opposed to the whole java reflection 
API) is so clients can pass the classname of the function(ality) that should 
process the data along with the message. The server can (attempt to) 
instantiate the class and pass the rest of the data in the message to get the 
work done. This way, the server can stay dumb.

I think at the end of the day a factory versus new_by_name is the same thing 
(in C++) - its alist of mappings from classnames to code to create new classe 
instances.

Mike Papper

On Thursday 25 September 2003 02:13 am, Andrey Kulikov wrote:
> Hi All.
>
> >> I would like the Java introspection functionality - or at
> >> least to be able to
> >> create an instance of a class from its name. This would mean
> >> there is no need
> >> for "Factories". I call this feature "new by name" because
>
> From my point of view the main advantage and reason for using
> "Factories" is hiding from clients real implementation of
> requested interfaces. I.e. if i request interface 'Logger from
> 'LoggerFactory', it does not matter for me, what the implementation of
> this interface - 'FileLogger', 'DBLogger' or 'SMTPLogger'.
> And if i explicitly specify a name of class - how can i forget about a
> Factories?
>
> And what the motivation for implementing this Java reflection API like
> stuff?
>
> >> An example on how to use it:
> >> ChildClass cl = (ChildClass)new_by_name("Children_of_ChildClass");
>
> PB> Take a look at the persistence engine.
>
> PB> There are some subtilities (it seems to me that the class name is
> written PB> only once and then only short class ids instance of the class
> name, ...)
>
> Yes, using persistent container is a good idea.
> But implementing this is a very complex task, and purchasing it is
> very expensive. All the more i don't know good open source C++
> persistent container. :(
>
> And opinion on this question is that in complex cases is only one way
> for make instances of classes by name - persistent layer in
> application of something like CORBA.
> And in simple cases it not necessary, and can be implemented by other ways.

-- 
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Fri Sep 26 00:18:54 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2k4E-0000j6-Dg
	for mharc-bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:54 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2k4B-0000i5-Hy
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:51 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2k49-0000hj-Uq
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:50 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2k49-0000gA-9V
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:49 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8Q4Ilfl012105
	for <bug-commoncpp@gnu.org>; Thu, 25 Sep 2003 21:18:48 -0700
Message-Id: <200309260418.h8Q4Ilfl012105@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
From: Mike Papper <m.papper@fantastic.com>
Organization: Fantastic
To: bug-commoncpp@gnu.org
Date: Thu, 25 Sep 2003 20:41:28 -0700
X-Mailer: KMail [version 1.3.2]
References: <D3AF5F134D627243993F2F2FC32EE4D229C885@mailman.eason.com>
In-Reply-To: <D3AF5F134D627243993F2F2FC32EE4D229C885@mailman.eason.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: client-server streaming of data...does isPending work on error if
	you only set the pendingInput flag?
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Sep 2003 04:18:52 -0000

Running on linux...
I have a program that uses a subclass of TCPSocket to create a new thread and 
hand off the connection to a TCPSession.

The code is from some example somewhere, its like this:
loop
  subclassTCPSocket listen(Addr);
  if (listen.isPendingConnection(timeout)) {
    tcp = new ecsTCPSession(server);
    tcp.detach();
  end for
end loop

In the TCPSession (thread):
if (isPending(Socket::pendingInput, 1000)) {
      string tmp_data;
      *tcp() >> tmp_data;
      break;
}
tcp() << "Hello from server " << endl;
// and the thread dies (and to verify, I do see debug output in its 
destructor)

1) Is there any good documentation on how to use this class library?
2) Is there a better way to read and send characters on the TCPSession rather 
than using the stream operators? I.e., I would like something that told me 
how many characters it read (and suggested how many characters I had in my 
buffer). The call to *tcp() >> tmp_data doesnt really tell me how much was 
read in and in fact seems to read only up to the first space character. I 
found a methd called read() but it seems very broken (hangs).
3) Does the call to isPending take a bitmask of the Pending values, such as 
Socket::pendingInput | Socket::pendingOutput | Socket::pendingError?
Shouldnt it be mandatory to always look for an error or else we will be 
blocked in this fucntion forever if there was an error? Or will isPending 
return (false) if the socket is closed or some other underlying socket error 
occurs????
4) Can I use the >> operator (as in "*tcp() << string") (without calling 
isPending) to read input from the socket and assume that is a blocking read? 
5) One must assume that if we call isPending and get "true" that by the time 
the next line of code executes, there may not be any data on the socket or 
the connectionmay have closed.
Thus the use of the stream operator ("*tcp() << string") must be able to deal 
with failures.  How is this done? Is an exception thrown??

Any help with how to do standard client-server is appreciated due to lack of 
good docs for this library...

-- 
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113




From MAILER-DAEMON Fri Sep 26 00:18:56 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2k4F-0000jk-RE
	for mharc-bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:55 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2k4E-0000j8-A4
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:54 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2k4C-0000iO-Az
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:53 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2k4B-0000hy-Qq
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:18:52 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8Q4Ilfn012105
	for <bug-commoncpp@gnu.org>; Thu, 25 Sep 2003 21:18:52 -0700
Message-Id: <200309260418.h8Q4Ilfn012105@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
From: Mike Papper <m.papper@fantastic.com>
Organization: Fantastic
To: bug-commoncpp@gnu.org
Date: Thu, 25 Sep 2003 21:16:07 -0700
X-Mailer: KMail [version 1.3.2]
References: <D3AF5F134D627243993F2F2FC32EE4D229C885@mailman.eason.com>
In-Reply-To: <D3AF5F134D627243993F2F2FC32EE4D229C885@mailman.eason.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: zombie creation while debugging and crash in detach()
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Sep 2003 04:18:55 -0000

Running on linux...red hat 7.2 . CommonCPP version downloaded 
from commoncpp web site about 1 week ago.

I have a program that uses a subclass of TCPSocket to create a new thread and 
hand off the connection to a TCPSession.

The code is from some example somewhere, its like this:
loop
  subclassTCPSocket listen(Addr);
  if (listen.isPendingConnection(timeout)) {
    tcp = new ecsTCPSession(server);
    tcp.detach();
  end for
end loop

In the TCPSession (thread):
if (isPending(Socket::pendingInput, 1000)) {
      string tmp_data;
      *tcp() >> tmp_data;
      break;
}
tcp() << "Hello from server " << endl;
// and the thread dies (and to verify, I do see debug output in its 
destructor)

Sometimes this server crashes. So I ran in the debugger (using gdb) and what 
I saw was a zombie thread for each new socket accept. I also saw 2 processes 
that were always there. 

Debugger Stack trace when it crashes:-------------------------------------
0x080614bc in ost::Thread::detach (this=0x8079e34, start=0x0) at 
thread.cpp:729
729     thread.cpp: No such file or directory.
        in thread.cpp
(gdb) where
#0  0x080614bc in ost::Thread::detach (this=0x8079e34, start=0x0) at 
thread.cpp:729
#1  0x080505a5 in main (argc=2, argv=0xbfffea44) at mcs.cpp:257
#2  0x405a0657 in __libc_start_main (main=0x805007c <main>, argc=2, 
ubp_av=0xbfffea44, init=0x804e3d4 <_init>,
    fini=0x806b734 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, 
stack_end=0xbfffea3c) at ../sysdeps/generic/libc-start.c:129
-------------------------------
The call to ost::Thread::detach is made from my code (line 257 mentioned in 
the stack trace, the line for "main") that calls detach (see above) just 
after the call to new ecsTCPSession. Perhaps the thread object has already 
"deleted" itself before I get a chance to call detach (and there is a 
dangling pointer)? But I thought that run isnt called until the new thread is 
created. Is this an incorrect assumption? (If I remove the detach call, I see 
no output from the thread object -- so this call to detach is neccessary).

Here is the line 728 and 729 and 730 as mentioned in the debug log (for 
thread.cpp inside the commoncpp detach method):
-------------------
728: rtn = pthread_create(&priv->_tid, &priv->_attr, 
exec_t(&ccxx_exec_handler), this);
729:        if(!rtn && priv->_tid)
730:                return 0;
-------------------------

When I run outside of the debugger, I see the same numbered linux processes 
over and over - i..e, I do not see new threads being created. There are 
always 2 processes with the same PIDs (assuming one client connection at a 
time). Somehow the same thread is being resued - any ideas how?

Additional Questions:
---------------------------
1) Is there a thread pool in commoncpp operating so that its normal to see 
the same 2 processes/linux threads being resued for several connections? 
(non-debugger situation). Or would linux be capable of this re-use of PID?
2)Why are the zombie processes created when running in the debugger?
3) Is there any good documentation on how to use this class library?

Please Note: when I run on red hat 9, I always see exctly 1 process (new m:n 
threading model). Any way to see its threads?
Also, this bug does not occur on rh9. Is this impl. dependent?

-- 
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Fri Sep 26 00:26:37 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A2kBg-00053d-Kn
	for mharc-bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:26:36 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A2kBe-00053Y-FR
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:26:34 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A2kBc-00053J-M3
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:26:33 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A2kBc-000533-46
	for bug-commoncpp@gnu.org; Fri, 26 Sep 2003 00:26:32 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8Q4QTfl012446
	for <bug-commoncpp@gnu.org>; Thu, 25 Sep 2003 21:26:32 -0700
Message-Id: <200309260426.h8Q4QTfl012446@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
From: Mike Papper <m.papper@fantastic.com>
Organization: Fantastic
To: bug-commoncpp@gnu.org
Date: Thu, 25 Sep 2003 21:26:26 -0700
X-Mailer: KMail [version 1.3.2]
References: <D3AF5F134D627243993F2F2FC32EE4D229C885@mailman.eason.com>
	<200309260418.h8Q4Ilfn012105@mail.fantastic.com>
In-Reply-To: <200309260418.h8Q4Ilfn012105@mail.fantastic.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: zombie creation while debugging and crash in detach()
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Sep 2003 04:26:35 -0000

I said that I did not see this on red hat 9. I do see it, it just takes a bit 
more effort (running 3 clients at once kills it in about 20 seconds).

Mike Papper

On Thursday 25 September 2003 09:16 pm, Mike Papper wrote:
> Running on linux...red hat 7.2 . CommonCPP version downloaded
> from commoncpp web site about 1 week ago.
>
> I have a program that uses a subclass of TCPSocket to create a new thread
> and hand off the connection to a TCPSession.
>
> The code is from some example somewhere, its like this:
> loop
>   subclassTCPSocket listen(Addr);
>   if (listen.isPendingConnection(timeout)) {
>     tcp = new ecsTCPSession(server);
>     tcp.detach();
>   end for
> end loop
>
> In the TCPSession (thread):
> if (isPending(Socket::pendingInput, 1000)) {
>       string tmp_data;
>       *tcp() >> tmp_data;
>       break;
> }
> tcp() << "Hello from server " << endl;
> // and the thread dies (and to verify, I do see debug output in its
> destructor)
>
> Sometimes this server crashes. So I ran in the debugger (using gdb) and
> what I saw was a zombie thread for each new socket accept. I also saw 2
> processes that were always there.
>
> Debugger Stack trace when it crashes:-------------------------------------
> 0x080614bc in ost::Thread::detach (this=0x8079e34, start=0x0) at
> thread.cpp:729
> 729     thread.cpp: No such file or directory.
>         in thread.cpp
> (gdb) where
> #0  0x080614bc in ost::Thread::detach (this=0x8079e34, start=0x0) at
> thread.cpp:729
> #1  0x080505a5 in main (argc=2, argv=0xbfffea44) at mcs.cpp:257
> #2  0x405a0657 in __libc_start_main (main=0x805007c <main>, argc=2,
> ubp_av=0xbfffea44, init=0x804e3d4 <_init>,
>     fini=0x806b734 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,
> stack_end=0xbfffea3c) at ../sysdeps/generic/libc-start.c:129
> -------------------------------
> The call to ost::Thread::detach is made from my code (line 257 mentioned in
> the stack trace, the line for "main") that calls detach (see above) just
> after the call to new ecsTCPSession. Perhaps the thread object has already
> "deleted" itself before I get a chance to call detach (and there is a
> dangling pointer)? But I thought that run isnt called until the new thread
> is created. Is this an incorrect assumption? (If I remove the detach call,
> I see no output from the thread object -- so this call to detach is
> neccessary).
>
> Here is the line 728 and 729 and 730 as mentioned in the debug log (for
> thread.cpp inside the commoncpp detach method):
> -------------------
> 728: rtn = pthread_create(&priv->_tid, &priv->_attr,
> exec_t(&ccxx_exec_handler), this);
> 729:        if(!rtn && priv->_tid)
> 730:                return 0;
> -------------------------
>
> When I run outside of the debugger, I see the same numbered linux processes
> over and over - i..e, I do not see new threads being created. There are
> always 2 processes with the same PIDs (assuming one client connection at a
> time). Somehow the same thread is being resued - any ideas how?
>
> Additional Questions:
> ---------------------------
> 1) Is there a thread pool in commoncpp operating so that its normal to see
> the same 2 processes/linux threads being resued for several connections?
> (non-debugger situation). Or would linux be capable of this re-use of PID?
> 2)Why are the zombie processes created when running in the debugger?
> 3) Is there any good documentation on how to use this class library?
>
> Please Note: when I run on red hat 9, I always see exctly 1 process (new
> m:n threading model). Any way to see its threads?
> Also, this bug does not occur on rh9. Is this impl. dependent?

-- 
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Mon Sep 29 00:02:44 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A3pFE-00061z-5X
	for mharc-bug-commoncpp@gnu.org; Mon, 29 Sep 2003 00:02:44 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A3pFC-00061s-7b
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 00:02:42 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A3pF6-0005zm-E3
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 00:02:41 -0400
Received: from [63.196.25.67] (helo=mail.fantastic.com)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A3p9b-0005KD-3T
	for bug-commoncpp@gnu.org; Sun, 28 Sep 2003 23:56:55 -0400
Received: from there (207-214-146-171-dhcp.digitalpipe.net [207.214.146.171])
	by mail.fantastic.com (8.12.8/8.12.8) with SMTP id h8T3umfl006425
	for <bug-commoncpp@gnu.org>; Sun, 28 Sep 2003 20:56:48 -0700
Message-Id: <200309290356.h8T3umfl006425@mail.fantastic.com>
Content-Type: text/plain;
  charset="iso-8859-1"
From: Mike Papper <m.papper@fantastic.com>
Organization: Fantastic
To: bug-commoncpp@gnu.org
Date: Sun, 28 Sep 2003 20:56:43 -0700
X-Mailer: KMail [version 1.3.2]
References: <D3AF5F134D627243993F2F2FC32EE4D229C885@mailman.eason.com>
	<200309260418.h8Q4Ilfn012105@mail.fantastic.com>
In-Reply-To: <200309260418.h8Q4Ilfn012105@mail.fantastic.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: zombie creation while debugging and crash in detach()...mutex
	neccessary - why?
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Sep 2003 04:02:42 -0000

This problem was fixed by using a mutex in both the thread class and the 
function that created the thread (main). I dont think this should be 
neccessary as the thread should not goto its "detach" method (which does a 
delete this) until its run method finishes - and run should not start until 
detach is called from the calling thread.

BUT using a mutex here solved the problem. Any ideas? Perhaps the threads 
detach is called from the constructor in certain error cases?

Note: if I dont call detach fromt he calling thread (main) the new threads 
run method is never called.

Mike Papper

On Thursday 25 September 2003 09:16 pm, Mike Papper wrote:
> Running on linux...red hat 7.2 . CommonCPP version downloaded
> from commoncpp web site about 1 week ago.
>
> I have a program that uses a subclass of TCPSocket to create a new thread
> and hand off the connection to a TCPSession.
>
> The code is from some example somewhere, its like this:
> loop
>   subclassTCPSocket listen(Addr);
>   if (listen.isPendingConnection(timeout)) {
>     tcp = new ecsTCPSession(server);
>     tcp.detach();
>   end for
> end loop
>
> In the TCPSession (thread):
> if (isPending(Socket::pendingInput, 1000)) {
>       string tmp_data;
>       *tcp() >> tmp_data;
>       break;
> }
> tcp() << "Hello from server " << endl;
> // and the thread dies (and to verify, I do see debug output in its
> destructor)
>
> Sometimes this server crashes. So I ran in the debugger (using gdb) and
> what I saw was a zombie thread for each new socket accept. I also saw 2
> processes that were always there.
>
> Debugger Stack trace when it crashes:-------------------------------------
> 0x080614bc in ost::Thread::detach (this=0x8079e34, start=0x0) at
> thread.cpp:729
> 729     thread.cpp: No such file or directory.
>         in thread.cpp
> (gdb) where
> #0  0x080614bc in ost::Thread::detach (this=0x8079e34, start=0x0) at
> thread.cpp:729
> #1  0x080505a5 in main (argc=2, argv=0xbfffea44) at mcs.cpp:257
> #2  0x405a0657 in __libc_start_main (main=0x805007c <main>, argc=2,
> ubp_av=0xbfffea44, init=0x804e3d4 <_init>,
>     fini=0x806b734 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>,
> stack_end=0xbfffea3c) at ../sysdeps/generic/libc-start.c:129
> -------------------------------
> The call to ost::Thread::detach is made from my code (line 257 mentioned in
> the stack trace, the line for "main") that calls detach (see above) just
> after the call to new ecsTCPSession. Perhaps the thread object has already
> "deleted" itself before I get a chance to call detach (and there is a
> dangling pointer)? But I thought that run isnt called until the new thread
> is created. Is this an incorrect assumption? (If I remove the detach call,
> I see no output from the thread object -- so this call to detach is
> neccessary).
>
> Here is the line 728 and 729 and 730 as mentioned in the debug log (for
> thread.cpp inside the commoncpp detach method):
> -------------------
> 728: rtn = pthread_create(&priv->_tid, &priv->_attr,
> exec_t(&ccxx_exec_handler), this);
> 729:        if(!rtn && priv->_tid)
> 730:                return 0;
> -------------------------
>
> When I run outside of the debugger, I see the same numbered linux processes
> over and over - i..e, I do not see new threads being created. There are
> always 2 processes with the same PIDs (assuming one client connection at a
> time). Somehow the same thread is being resued - any ideas how?
>
> Additional Questions:
> ---------------------------
> 1) Is there a thread pool in commoncpp operating so that its normal to see
> the same 2 processes/linux threads being resued for several connections?
> (non-debugger situation). Or would linux be capable of this re-use of PID?
> 2)Why are the zombie processes created when running in the debugger?
> 3) Is there any good documentation on how to use this class library?
>
> Please Note: when I run on red hat 9, I always see exctly 1 process (new
> m:n threading model). Any way to see its threads?
> Also, this bug does not occur on rh9. Is this impl. dependent?

-- 
Mike Papper
Fantastic
m.papper@fantastic.com
650-356-2113



From MAILER-DAEMON Mon Sep 29 11:43:38 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A40BU-0003MJ-9q
	for mharc-bug-commoncpp@gnu.org; Mon, 29 Sep 2003 11:43:36 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A40BP-0003Ig-Ql
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 11:43:31 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A40As-00035y-Mj
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 11:43:29 -0400
Received: from [195.101.245.15] (helo=p-mail1.rd.francetelecom.com)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 1A40As-00035T-7F
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 11:42:58 -0400
Received: from FTRDMEL2.rd.francetelecom.fr ([10.193.117.153]) by
	parsmtp1.rd.francetelecom.com with Microsoft SMTPSVC(5.0.2195.5329); 
	Mon, 29 Sep 2003 17:42:56 +0200
Content-Class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C386A0.59E414F8"
X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0
Date: Mon, 29 Sep 2003 17:42:55 +0200
Message-ID: <3418F3471F1CA4409901547349FFAE2E696186@ftrdmel2.rd.francetelecom.fr>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Conditional class
thread-index: AcOGoFnWQWop3NmWTj60eN8VNwFYwg==
From: "zze-BARAULT Eric FTRD/DAC/LAN" <eric.barault@rd.francetelecom.com>
To: <bug-commoncpp@gnu.org>
X-OriginalArrivalTime: 29 Sep 2003 15:42:56.0199 (UTC)
	FILETIME=[5A285D70:01C386A0]
Subject: Conditional class
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Sep 2003 15:43:33 -0000

This is a multi-part message in MIME format.

------_=_NextPart_001_01C386A0.59E414F8
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,=20
=20
Since i can't find any example on how to use the conditional class, can =
someone post one to me please?
=20
I simply try this in a class that inherits Thread:
=20
Conditional lock;
lock.wait(5);
=20
hoping that this will block for 5s since i don't signal on lock, but i =
can't get it to work : lock.wait() doesn't hold my thread.
=20
Many thanks for any help!
=20
Eric


------_=_NextPart_001_01C386A0.59E414F8
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.00.3504.2500" name=3DGENERATOR></HEAD>
<BODY style=3D"COLOR: #000000; FONT-FAMILY: Arial" =
hb_focus_attach=3D"true">
<DIV><FONT size=3D2>
<DIV><FONT size=3D2><SPAN class=3D844282915-29092003>Hi all, =
</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D844282915-29092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D844282915-29092003>Since i can't find =
any example=20
on how to use the conditional class, can someone post one to me=20
please?</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D844282915-29092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D844282915-29092003>I simply try this =
in a class=20
that inherits Thread:</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D844282915-29092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D844282915-29092003>Conditional=20
lock;</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN=20
class=3D844282915-29092003>lock.wait(5);</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D844282915-29092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D844282915-29092003>hoping that this =
will block for=20
5s since i don't signal on lock, but i can't get it to work : =
lock.wait()=20
doesn't hold my thread.</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D844282915-29092003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Many thanks for any help!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>Eric</FONT></DIV></FONT></DIV>
<P></P></BODY></HTML>

------_=_NextPart_001_01C386A0.59E414F8--



From MAILER-DAEMON Mon Sep 29 12:15:20 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A40g9-0000FW-Rk
	for mharc-bug-commoncpp@gnu.org; Mon, 29 Sep 2003 12:15:17 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A40g4-0000EO-5P
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 12:15:12 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A40fV-00007X-Aw
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 12:15:08 -0400
Received: from [138.89.82.77] (helo=localhost.bayonne.dyndns.org)
	by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.22) id 1A40SK-0006ln-83
	for bug-commoncpp@gnu.org; Mon, 29 Sep 2003 12:01:00 -0400
Received: from 192.168.1.103 ([192.168.1.103])
	by localhost.bayonne.dyndns.org (8.12.8/8.12.8) with ESMTP id
	h8TGvVUf021885; Mon, 29 Sep 2003 12:57:32 -0400
From: David Sugar <dyfet@ostel.com>
To: "zze-BARAULT Eric FTRD/DAC/LAN" <eric.barault@rd.francetelecom.com>
Date: Mon, 29 Sep 2003 12:09:26 -0400
User-Agent: KMail/1.5
References: <3418F3471F1CA4409901547349FFAE2E696181@ftrdmel2.rd.francetelecom.fr>
In-Reply-To: <3418F3471F1CA4409901547349FFAE2E696181@ftrdmel2.rd.francetelecom.fr>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200309291209.26984.dyfet@ostel.com>
Cc: bug-commoncpp@gnu.org
Subject: Re: Follow Up:  Question regarding the Conditional class
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Sep 2003 16:15:16 -0000

Remember that the functioning of a posix conditional depends on the associated 
mutex.  Based on that, I kind of see why it may be nessisary to approach the 
mutex at the same time the wait is occuring, and I may change wait to do this 
automatically.  However, this brings a question about having multiple threads 
waiting on a conditional.  This example also seems to be with Common C++, 
rather than with Common C++ "2".

On Monday 29 September 2003 11:14 am, zze-BARAULT Eric FTRD/DAC/LAN wrote:
> hi,
>
> i saw this post on the common c++ forum:
>
> ----------------------
>
> I'm experiencing a situation where a thread's call to
> Conditional::Wait() will -not- be unblocked when
> another thread calls Conditional::Signal() for the
> same Conditional instance.  I began to wonder if I was
> doing something wrong with the Conditional, so I
> experimented.  Here's a very contrived test I'd like
> to ask you about:
>
> /***Example.cpp ***/
> class NextTest : public Thread
> {
> public:
>   NextTest(Conditional& Locker,int WichMethod) :
>     m_Locker(Locker) {Start();}
>   void ThisWorks(void) {
>     m_Locker.EnterMutex();
>     m_Locker.Wait();
>     m_Locker.LeaveMutex();
>   }
>   void ThisDoesnt(void)   {  m_Locker.Wait();  }
>   void Run(void)  {
>     for(;;) {
>       if( m_WhichMethod )  ThisWorks();
>       else                 ThisDoesnt();
>       puts("No longer locked");
>     }
>   }
> private:
>   Conditional& m_Locker;
> };
>
> int main(int argc,char *argv[])
> {
>   Conditional cond;
>   NextTest    next( cond,atoi(argv[1]) );
>
>   for(;;)
>   {
>     sleep(1);
>     puts("About to wake up thread");
>     cond.Signal(false);
>     puts("Finished waking thread");
>   }
> }
> /*** end example ***/
>
> I expect the main process to wake up the thread once
> per second;  I expect the thread to anounce the
> Signal() when it exits the Wait(), and then return to
> a Wait() until again Signal()'ed, so on and on.
>
> A call to method ThisDoesnt() never blocks on the call
> to Wait() and we get a rapid stream of output -- not
> output on a 1-second interval.  But a call to
> ThisWorks() does what I expect, and the reporting is
> paced exactly as anticipated.
>
> Question:  Why won't ThisDoesnt()'s call to Wait()
> block?
>
> Question:  Why is it, in ThisWorks(), that if I
> EnterMutex() then Wait(), then ExitMutex(), I get the
> functionality I'm looking for?  Somehow it seems
> strange that I have to work these two extra steps, and
> that makes me wonder if I am using them incorrectly.
>
> Question:  In a larger program I wrote, based on the
> structure of ThisWorks() for the conditional blocking,
> when the thread is in a Wait() call, another thread
> calls the Conditional::Signal() to unblock the thread,
> but the thread never unblocks.  Oddly enough, my
> example (ThisWorks()) functions as I anticipated.  So
> I suspect I'm not using Conditional correctly.  Is
> there something I'm doing wrong that might cause the
> erronious behavior I've mentioned?
>
>
> Many thanks!
>
>
> Sincerely,
>
> D Wyc
>
> --------------------------
>
>
> I encounter the same problem and just can't see what is the trick to make
> it work...
>
> Could you please help??
>
>
> Regards,
>
> Eric Barault




From MAILER-DAEMON Tue Sep 30 07:45:24 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.22)
	id 1A4IwU-0008Jt-Ta
	for mharc-bug-commoncpp@gnu.org; Tue, 30 Sep 2003 07:45:22 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22)
	id 1A4IwR-0008IL-8o
	for bug-commoncpp@gnu.org; Tue, 30 Sep 2003 07:45:19 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22)
	id 1A4IcP-0004Gk-Ao
	for bug-commoncpp@gnu.org; Tue, 30 Sep 2003 07:25:08 -0400
Received: from [146.193.52.17] (helo=l2f.inesc-id.pt)
	by monty-python.gnu.org with esmtp (Exim 4.22) id 1A4I0V-0001eJ-GI
	for bug-commoncpp@gnu.org; Tue, 30 Sep 2003 06:45:28 -0400
Received: from Shaolin (shaolin [172.16.4.84])
	by l2f.inesc-id.pt (8.9.3/8.9.3) with SMTP id LAA19359
	for <bug-commoncpp@gnu.org>; Tue, 30 Sep 2003 11:44:59 +0100
Message-ID: <000801c38740$8c9ad580$540410ac@Shaolin>
From: "Rui Maia" <rfpm@mega.ist.utl.pt>
To: "CommonC++" <bug-commoncpp@gnu.org>
Date: Tue, 30 Sep 2003 11:49:39 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0005_01C38748.EE260510"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Subject: Problems linking. Unresolved symbols
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Rui Maia <rfpm@mega.ist.utl.pt>
List-Id: Bug reports for Common C++  <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 11:45:20 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C38748.EE260510
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I made something like this.

/**
Base-Class of all the execution threads
*/
class CAudimusThread: public Thread
{
   unsigned short m_id; /**< Thread ID */

public:
        CAudimusThread() {}=20
        void run() {}    =20
};


/**
Class for Endpoint execution
*/
class CAudimusEndpoint: public CAudimusThread,
                               CAudimusIOControl =20
{
      endpoint_struct *m_audio_s;     /**< Config struct */
public:
      /**
      Constructor
      Memory allocation and config structures initializers
      */
      CAudimusEndpoint();

      /**
      Execution function
      */
      void run() { run_endpoint(m_audio_s); }
};


std::list< CAudimusThread > m_sub_blocos;


And when i try to compile and link...



Linking...
libaudimusd.lib(AudioIn.obj) : error LNK2001: unresolved external symbol =
"protected: virtual void __thiscall ost::Thread::notify(class =
ost::Thread *)" (?notify@Thread@ost@@MAEXPAV12@@Z)
libaudimusd.lib(AudioIn.obj) : error LNK2001: unresolved external symbol =
"protected: virtual void * __thiscall ost::Thread::getExtended(void)" =
(?getExtended@Thread@ost@@MAEPAXXZ)
libaudimusd.lib(AudioIn.obj) : error LNK2001: unresolved external symbol =
"protected: virtual void __thiscall ost::Thread::initial(void)" =
(?initial@Thread@ost@@MAEXXZ)
libaudimusd.lib(AudioIn.obj) : error LNK2001: unresolved external symbol =
"protected: virtual void __thiscall ost::Thread::final(void)" =
(?final@Thread@ost@@MAEXXZ)
libaudimusd.lib(AudioIn.obj) : error LNK2001: unresolved external symbol =
"__declspec(dllimport) public: __thiscall =
ost::Thread::Thread(int,unsigned int)" (__imp_??0Thread@ost@@QAE@HI@Z)
libaudimusd.lib(AudioIn.obj) : error LNK2001: unresolved external symbol =
"__declspec(dllimport) public: virtual __thiscall =
ost::Thread::~Thread(void)" (__imp_??1Thread@ost@@UAE@XZ)
..\audimus_exemplo.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.


Rui Maia
**********
EMAIL: rfpm@mega.ist.utl.pt   Rui.Maia@l2f.inesc-id.pt
WEB:   http://mega.ist.utl.pt/~rfpm
*****************************************
------=_NextPart_000_0005_01C38748.EE260510
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I made something like =
this.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/**<BR>Base-Class of all the execution=20
threads<BR>*/<BR>class CAudimusThread: public =
Thread<BR>{<BR>&nbsp;&nbsp;=20
unsigned short m_id; /**&lt; Thread ID */</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>public:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
CAudimusThread() {}=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void run()=20
{}&nbsp;&nbsp;&nbsp;&nbsp; <BR>};</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/**<BR>Class for Endpoint =
execution<BR>*/<BR>class=20
CAudimusEndpoint: public=20
CAudimusThread,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
CAudimusIOControl&nbsp; <BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
endpoint_struct=20
*m_audio_s;&nbsp;&nbsp;&nbsp;&nbsp; /**&lt; Config struct=20
*/<BR>public:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
/**<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Constructor<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Memory allocation and =
config=20
structures initializers<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CAudimusEndpoint();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
/**<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Execution=20
function<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
void run() { run_endpoint(m_audio_s); }<BR>};</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>std::list&lt; CAudimusThread &gt;=20
m_sub_blocos;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And when i try to compile and =
link...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>Linking...<BR>libaudimusd.lib(AudioIn.obj) : error=20
LNK2001: unresolved external symbol "protected: virtual void __thiscall=20
ost::Thread::notify(class ost::Thread *)" (<A=20
href=3D"mailto:?notify@Thread@ost@@MAEXPAV12@@Z">?notify@Thread@ost@@MAEX=
PAV12@@Z</A>)<BR>libaudimusd.lib(AudioIn.obj)=20
: error LNK2001: unresolved external symbol "protected: virtual void *=20
__thiscall ost::Thread::getExtended(void)" (<A=20
href=3D"mailto:?getExtended@Thread@ost@@MAEPAXXZ">?getExtended@Thread@ost=
@@MAEPAXXZ</A>)<BR>libaudimusd.lib(AudioIn.obj)=20
: error LNK2001: unresolved external symbol "protected: virtual void =
__thiscall=20
ost::Thread::initial(void)" (<A=20
href=3D"mailto:?initial@Thread@ost@@MAEXXZ">?initial@Thread@ost@@MAEXXZ</=
A>)<BR>libaudimusd.lib(AudioIn.obj)=20
: error LNK2001: unresolved external symbol "protected: virtual void =
__thiscall=20
ost::Thread::final(void)" (<A=20
href=3D"mailto:?final@Thread@ost@@MAEXXZ">?final@Thread@ost@@MAEXXZ</A>)<=
BR>libaudimusd.lib(AudioIn.obj)=20
: error LNK2001: unresolved external symbol "__declspec(dllimport) =
public:=20
__thiscall ost::Thread::Thread(int,unsigned int)" (<A=20
href=3D"mailto:__imp_??0Thread@ost@@QAE@HI@Z">__imp_??0Thread@ost@@QAE@HI=
@Z</A>)<BR>libaudimusd.lib(AudioIn.obj)=20
: error LNK2001: unresolved external symbol "__declspec(dllimport) =
public:=20
virtual __thiscall ost::Thread::~Thread(void)" (<A=20
href=3D"mailto:__imp_??1Thread@ost@@UAE@XZ">__imp_??1Thread@ost@@UAE@XZ</=
A>)<BR>..\audimus_exemplo.exe=20
: fatal error LNK1120: 6 unresolved externals<BR>Error executing=20
link.exe.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Rui Maia<BR>**********<BR>EMAIL: <A=20
href=3D"mailto:rfpm@mega.ist.utl.pt">rfpm@mega.ist.utl.pt</A>&nbsp;&nbsp;=
 <A=20
href=3D"mailto:Rui.Maia@l2f.inesc-id.pt">Rui.Maia@l2f.inesc-id.pt</A><BR>=
WEB:&nbsp;&nbsp;=20
<A=20
href=3D"http://mega.ist.utl.pt/~rfpm">http://mega.ist.utl.pt/~rfpm</A><BR=
>*****************************************</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C38748.EE260510--





