From MAILER-DAEMON Fri May 04 02:37:16 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1HjrPo-0003e8-9B
	for mharc-bug-commoncpp@gnu.org; Fri, 04 May 2007 02:37:16 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1HjrPm-0003dV-DB
	for bug-commoncpp@gnu.org; Fri, 04 May 2007 02:37:14 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1HjrPl-0003ct-7f
	for bug-commoncpp@gnu.org; Fri, 04 May 2007 02:37:13 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1HjrPk-0003cn-TZ
	for bug-commoncpp@gnu.org; Fri, 04 May 2007 02:37:12 -0400
Received: from mail.gmx.net ([213.165.64.20])
	by monty-python.gnu.org with smtp (Exim 4.60)
	(envelope-from <tpfaff@gmx.net>) id 1HjrJ8-00044e-Md
	for bug-commoncpp@gnu.org; Fri, 04 May 2007 02:30:23 -0400
Received: (qmail 21885 invoked by uid 0); 4 May 2007 06:30:21 -0000
Received: from 145.253.69.50 by www044.gmx.net with HTTP;
	Fri, 04 May 2007 08:30:21 +0200 (CEST)
Content-Type: multipart/mixed; boundary="========GMX16643117826022253459"
Date: Fri, 04 May 2007 08:30:22 +0200
From: "Thomas Pfaff" <tpfaff@gmx.net>
Message-ID: <20070504063022.166430@gmx.net>
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
X-Authenticated: #623905
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
X-Priority: 3
X-Provags-ID: V01U2FsdGVkX18WCzwAwCAWBy+L2HxHKzEh5yGFZQzM/0KkProozY
	l2WM/P88Dqq7fZnYuZJF8sQMbD769kwZESfg== 
X-GMX-UID: zeUIdzdpIydmEQTgfWdrJFpSa2FkZlXV
X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4)
Subject: Bugfix for Serial::isPending on WIN32
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 04 May 2007 06:37:14 -0000

--========GMX16643117826022253459
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

The overlapped handling in Serial::isPending is wrong.

If isPending is called more than once with a timeout other than INFINITE the second call will always wait until the timeout elapsed even if there is data available.

Regards,
Thomas
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

--========GMX16643117826022253459
Content-Type: application/octet-stream; name="serial_isPending.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="serial_isPending.patch"

LS0tIHNyYy9zZXJpYWwuY3BwLm9yZwkyMDA3LTAxLTIzIDE3OjQ0OjQwLjAwMDAwMDAwMCArMDEw
MAorKysgc3JjL3NlcmlhbC5jcHAJMjAwNy0wNS0wMyAxMTo1MDoxNC4zMDE4NzUwMDAgKzAyMDAK
QEAgLTkyNSw2ICs5MjUsNyBAQCBib29sIFNlcmlhbDo6aXNQZW5kaW5nKFBlbmRpbmcgcGVuZGlu
ZywgCiAJCVRocmVhZDo6Q2FuY2VsIHNhdmUgPSBUaHJlYWQ6OmVudGVyQ2FuY2VsKCk7CiAJCU9W
RVJMQVBQRUQgb2w7CiAJCURXT1JEIGR3TWFzazsKKwkJRFdPUkQgZHdFdmVudHMgPSAwOwogCQlC
T09MIHN1YzsKIAogCQltZW1zZXQoJm9sLCAwLCBzaXplb2YoT1ZFUkxBUFBFRCkpOwpAQCAtOTM5
LDExICs5NDAsMTcgQEAgYm9vbCBTZXJpYWw6OmlzUGVuZGluZyhQZW5kaW5nIHBlbmRpbmcsIAog
CiAJCVNldENvbW1NYXNrKGRldiwgZHdNYXNrKTsKIAkJLy8gbGV0J3Mgd2FpdCBmb3IgZXZlbnQg
b3IgdGltZW91dAotCQlpZigoc3VjID0gV2FpdENvbW1FdmVudChkZXYsICZkd01hc2ssICZvbCkp
ID09IEZBTFNFKSB7CisJCWlmKChzdWMgPSBXYWl0Q29tbUV2ZW50KGRldiwgJmR3RXZlbnRzLCAm
b2wpKSA9PSBGQUxTRSkgewogCQkJaWYoR2V0TGFzdEVycm9yKCkgPT0gRVJST1JfSU9fUEVORElO
RykgeworCQkJCURXT1JEIHRyYW5zZmVycmVkOworCiAJCQkJZHdFcnJvciA9IFdhaXRGb3JTaW5n
bGVPYmplY3Qob2wuaEV2ZW50LCB0aW1lb3V0KTsKLQkJCQlzdWMgPSAoZHdFcnJvciA9PSBXQUlU
X09CSkVDVF8wKTsKLQkJCQlTZXRDb21tTWFzayhkZXYsIDApOworCQkJCWlmIChkd0Vycm9yICE9
IFdBSVRfT0JKRUNUXzApCisJCQkJCVNldENvbW1NYXNrKGRldiwgMCk7CisKKwkJCQlzdWMgPSBH
ZXRPdmVybGFwcGVkUmVzdWx0KGRldiwgJm9sLCAmdHJhbnNmZXJyZWQsIFRSVUUpOworCQkJCWlm
IChzdWMpCisJCQkJCXN1YyA9IChkd0V2ZW50cyAmIGR3TWFzaykgPyBUUlVFIDogRkFMU0U7CiAJ
CQkJfQogCQkJZWxzZQogCQkJCUNsZWFyQ29tbUVycm9yKGRldiwgJmR3RXJyb3IsICZjcyk7Cg==
--========GMX16643117826022253459--



From MAILER-DAEMON Sun May 13 12:32:01 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1HnGzJ-0004tf-Jx
	for mharc-bug-commoncpp@gnu.org; Sun, 13 May 2007 12:32:01 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1HnGzI-0004tV-Rq
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 12:32:00 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1HnGzI-0004tJ-4h
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 12:32:00 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1HnGzI-0004tG-1r
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 12:32:00 -0400
Received: from sally.dts-online.net ([212.62.69.126])
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <wolfgang@alper-online.com>) id 1HnGrc-0002VC-1Y
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 12:24:04 -0400
Received: from sonne.kosmos.all (static-87-245-25-210.teleos-web.de
	[87.245.25.210])
	by sally.dts-online.net (Postfix) with ESMTP id 48B312AB5FF
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 18:24:02 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by sonne.kosmos.all (Postfix) with ESMTP id CC1C7100A72
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 17:52:38 +0200 (CEST)
Received: from sonne.kosmos.all ([127.0.0.1])
	by localhost (sonne [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
	id 20813-10 for <bug-commoncpp@gnu.org>;
	Sun, 13 May 2007 17:52:25 +0200 (CEST)
Received: from [192.168.250.112] (unknown [192.168.250.112])
	by sonne.kosmos.all (Postfix) with ESMTP id 18663100A71
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 17:52:25 +0200 (CEST)
From: Wolfgang Alper <wolfgang@alper-online.com>
To: bug-commoncpp@gnu.org
Date: Wed, 9 May 2007 15:38:01 +0200
User-Agent: KMail/1.9.4
MIME-Version: 1.0
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200705091538.01714.wolfgang@alper-online.com>
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at kosmos.all
X-detected-kernel: Genre and OS details not recognized.
Subject: Class Keydata - similar entries from multiple sections?
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 13 May 2007 16:32:01 -0000

Hello,
i am using commoncpp2-1.5.6.

How can i retrieve keys with the same name from a given section using the 
Class Keydata?

Example:
[general]
port = 1234
host = www.myhost.com
[proxy]
port = 4321
host = www.proxy.com

running 
load("/mydir/myfile/general");
and 
load("/mydir/myfile/proxy]");

This leads to multiple port and host entries. 

Of cause i can use getCount("port") and then iterate through the values, but 
this assumes to know wether a section has a key "port".
Also i could use clrValue("port") to clear the value before loading a new 
section, but this seems to be a bad workaround.

So how can i  query like "general/host" to get the value of host in the 
[general] section or "proxy/host" to get the host in the [proxy] section?

Thanks 

Wolfgang




From MAILER-DAEMON Sun May 13 16:22:05 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1HnKZx-000839-7e
	for mharc-bug-commoncpp@gnu.org; Sun, 13 May 2007 16:22:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1HnKZv-00080d-I0
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:22:03 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1HnKZs-0007tR-Kl
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:22:02 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1HnKZs-0007t4-DM
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:22:00 -0400
Received: from sally.dts-online.net ([212.62.69.126])
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <wolfgang@alper-online.com>) id 1HnKSB-0004H0-A7
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:14:03 -0400
Received: from sonne.kosmos.all (static-87-245-25-210.teleos-web.de
	[87.245.25.210])
	by sally.dts-online.net (Postfix) with ESMTP id 82CA29681EE
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 22:14:02 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by sonne.kosmos.all (Postfix) with ESMTP id 393EF100A72
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 21:47:43 +0200 (CEST)
Received: from sonne.kosmos.all ([127.0.0.1])
	by localhost (sonne [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
	id 24993-03 for <bug-commoncpp@gnu.org>;
	Sun, 13 May 2007 21:47:36 +0200 (CEST)
Received: from [192.168.250.112] (unknown [192.168.250.112])
	by sonne.kosmos.all (Postfix) with ESMTP id A30AF100A71
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 21:47:36 +0200 (CEST)
From: Wolfgang Alper <wolfgang@alper-online.com>
To: bug-commoncpp@gnu.org
Date: Wed, 9 May 2007 17:21:38 +0200
User-Agent: KMail/1.9.4
MIME-Version: 1.0
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <200705091721.38966.wolfgang@alper-online.com>
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at kosmos.all
X-detected-kernel: Genre and OS details not recognized.
Subject: Daemons - Using the process class?
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 13 May 2007 20:22:03 -0000

Hello,
I am using commoncpp2-1.5.6 under linux.
I tried using the process class but it seems i miss a piece.
Basicallyl i would like to create a daemon (using linux) based on fork.
i thought i would have to call: Process::detach();=20
=46rom the docs=20
"Detach current process into a daemon, posix only. Perhaps a similar method=
=20
can be used for creating win32 "services"?"

but this cannot work as it is defined as follows:
void	Process::detach(void) {	attach("/dev/null"); }

So it seems that :
void Process::attach (const char * devname ) =20
"Attach the current process to another device or i/o session. It is=20
deamonified and dissasociated with the prior parent process and controlling=
=20
terminal."
is the better choice.=20

But i still do not get it to work.=20
=2DWhat to pass as devname?=20
=2DHow do it get the PID to know wether i am the child or parent?
=2DHow can i pass parameter (like waitpid) to decide wether the parent want=
s to=20
wait for the child or not?

I am sure i missunderstood something, so if anyone could give an example on=
=20
how to use this class, this would be great.

Thanks

Wolfgang






From MAILER-DAEMON Sun May 13 16:44:21 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1HnKvU-0003tM-JG
	for mharc-bug-commoncpp@gnu.org; Sun, 13 May 2007 16:44:20 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1HnKvS-0003t8-3j
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:44:18 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1HnKvQ-0003sw-M0
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:44:17 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1HnKvQ-0003st-Ho
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:44:16 -0400
Received: from sally.dts-online.net ([212.62.69.126])
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <wolfgang@alper-online.com>) id 1HnKnj-0000Bl-KI
	for bug-commoncpp@gnu.org; Sun, 13 May 2007 16:36:19 -0400
Received: from sonne.kosmos.all (static-87-245-25-210.teleos-web.de
	[87.245.25.210])
	by sally.dts-online.net (Postfix) with ESMTP id 04C8928EE09
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 22:36:19 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by sonne.kosmos.all (Postfix) with ESMTP id CA833100A72
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 22:09:58 +0200 (CEST)
Received: from sonne.kosmos.all ([127.0.0.1])
	by localhost (sonne [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
	id 24068-10 for <bug-commoncpp@gnu.org>;
	Sun, 13 May 2007 22:09:52 +0200 (CEST)
Received: from [192.168.250.112] (unknown [192.168.250.112])
	by sonne.kosmos.all (Postfix) with ESMTP id 11729100A71
	for <bug-commoncpp@gnu.org>; Sun, 13 May 2007 22:09:52 +0200 (CEST)
From: Wolfgang Alper <wolfgang@alper-online.com>
To: bug-commoncpp@gnu.org
Date: Wed, 9 May 2007 17:37:23 +0200
User-Agent: KMail/1.9.4
References: <200705091721.38966.wolfgang@alper-online.com>
In-Reply-To: <200705091721.38966.wolfgang@alper-online.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200705091737.24142.wolfgang@alper-online.com>
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at kosmos.all
X-detected-kernel: Genre and OS details not recognized.
Subject: Re: Daemons - Using the process class?
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 13 May 2007 20:44:18 -0000

Hello,

Sorry, i just realized that the following is obviously wrong:
> but this cannot work as it is defined as follows:
> void	Process::detach(void) {	attach("/dev/null"); }

This calls attach with "dev/null". 

Anyway, i still do not get it to work so any help is apprecicated.

Example:
main() {
  cout << "before creating the daemon" <<  endl;
  // ? how to setup the parent to wait (or not) for the child?
  // cannot use detach because it would close all handles of the child.
  Process::attach("what goes here?");
  If ("what goes here?") {
    char buffer[32];
    cout << "i am the child" << endl;
    cin.getline(buffer, sizeof(buffer));
    cout << "Child: You entered:" << buffer << "\nDone:" << endl;  
    exit(0);
  } else {
    cout << "i am the parent - Done" << endl;    	
    exit(0);
  }
}

Regards 

Wolfgang 


Am Mittwoch, 9. Mai 2007 17:21 schrieb Wolfgang Alper:
> Hello,
> I am using commoncpp2-1.5.6 under linux.
> I tried using the process class but it seems i miss a piece.
> Basicallyl i would like to create a daemon (using linux) based on fork.
> i thought i would have to call: Process::detach();
> From the docs
> "Detach current process into a daemon, posix only. Perhaps a similar method
> can be used for creating win32 "services"?"
>
> but this cannot work as it is defined as follows:
> void	Process::detach(void) {	attach("/dev/null"); }
>
> So it seems that :
> void Process::attach (const char * devname )
> "Attach the current process to another device or i/o session. It is
> deamonified and dissasociated with the prior parent process and controlling
> terminal."
> is the better choice.
>
> But i still do not get it to work.
> -What to pass as devname?
> -How do it get the PID to know wether i am the child or parent?
> -How can i pass parameter (like waitpid) to decide wether the parent wants
> to wait for the child or not?
>
> I am sure i missunderstood something, so if anyone could give an example on
> how to use this class, this would be great.
>
> Thanks
>
> Wolfgang
>
>
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> Bug-commoncpp@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-commoncpp



From MAILER-DAEMON Sun May 27 07:42:19 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1HsH8d-0006QJ-LS
	for mharc-bug-commoncpp@gnu.org; Sun, 27 May 2007 07:42:19 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1HK9Ae-0006Ph-9D
	for bug-commoncpp@gnu.org; Thu, 22 Feb 2007 03:19:20 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1HK9Ac-0006Mb-La
	for bug-commoncpp@gnu.org; Thu, 22 Feb 2007 03:19:18 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1HK9Ac-0006MF-EC
	for bug-commoncpp@gnu.org; Thu, 22 Feb 2007 03:19:18 -0500
Received: from daemo09.udag.de ([62.146.33.133] helo=mail.udag.de)
	by monty-python.gnu.org with esmtp (Exim 4.52) id 1HK9Ac-0002to-27
	for bug-commoncpp@gnu.org; Thu, 22 Feb 2007 03:19:18 -0500
Received: from [10.6.100.2] (85-126-4-74.work.xdsl-line.inode.at [85.126.4.74])
	by mail.udag.de (Postfix) with ESMTP id C61EE8045;
	Thu, 22 Feb 2007 09:19:15 +0100 (CET)
Message-ID: <45DD5202.8050007@m-box.at>
From: klaus triendl <triendl.kj@m-box.at>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To: Wakan <wakan@bigfoot.com>
References: <45D9952A.3070605@bigfoot.com>
In-Reply-To: <45D9952A.3070605@bigfoot.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4)
X-Mailman-Approved-At: Sun, 27 May 2007 07:42:18 -0400
Cc: bug-commoncpp@gnu.org
Subject: Re: binary data transmit with TCPStream
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
Date: Thu, 22 Feb 2007 08:19:20 -0000
X-Original-Date: Thu, 22 Feb 2007 09:19:14 +0100
X-List-Received-Date: Thu, 22 Feb 2007 08:19:20 -0000

Wakan schrieb:
> I'm sending binary data over a socket connection using TCPStream.
> I'm using:
>                tcp.write(row[3],tpl_size);
>                tcp << endl;
> where row[3] contains binary data.

...

> In which way can I resolve that problem? How can I transmit in secure
> way binary data
> over the socket connection?

Hi Wakan,

I don't know how things are now with the newest release, but as of
1.0.5, TCPStream was made for sending text, not binary data.

This was the reason why I implemented my own BinaryTCPStream on the
client side and a binary streaming server (BinaryServer derived from
TCPSocket and BinaryPort derived from SocketPort) - which might not be
portable as I used it solely on windows. And things got more difficult
on the server because I needed a responsive server even one request was
currently being processed.

There sould be an example in the library how to implement your own
SocketPort as far as I can remember.



--
Klaus Triendl



From MAILER-DAEMON Sun May 27 07:42:19 2007
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1HsH8d-0006QO-Ps
	for mharc-bug-commoncpp@gnu.org; Sun, 27 May 2007 07:42:19 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1HjZEV-0006zc-1W
	for bug-commoncpp@gnu.org; Thu, 03 May 2007 07:12:23 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1HjZET-0006ve-8B
	for bug-commoncpp@gnu.org; Thu, 03 May 2007 07:12:22 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1HjZET-0006vE-33
	for bug-commoncpp@gnu.org; Thu, 03 May 2007 07:12:21 -0400
Received: from mail.gmx.net ([213.165.64.20])
	by monty-python.gnu.org with smtp (Exim 4.60)
	(envelope-from <tpfaff@gmx.net>) id 1HjZ7w-0000kC-Dm
	for bug-commoncpp@gnu.org; Thu, 03 May 2007 07:05:36 -0400
Received: (qmail 12369 invoked by uid 0); 3 May 2007 11:05:34 -0000
Received: from 145.253.69.50 by www100.gmx.net with HTTP;
	Thu, 03 May 2007 13:05:34 +0200 (CEST)
Content-Type: multipart/mixed; boundary="========GMX157841178190334691668"
From: "Thomas Pfaff" <tpfaff@gmx.net>
Message-ID: <20070503110534.157840@gmx.net>
MIME-Version: 1.0
To: bug-commoncpp@gnu.org
X-Authenticated: #623905
X-Flags: 0001
X-Mailer: WWW-Mail 6100 (Global Message Exchange)
X-Priority: 3
X-Provags-ID: V01U2FsdGVkX19W7XsCddhWcR+b1Go4ni601F+TQFfrsMfarJU/s+
	U/TpKfcMHQaHdmMMqFKjvAvolN9FOzb6bWDg== 
X-GMX-UID: xvYMct16TiE+WlLkbmRwQvB9ZUVSRBd9
X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4)
X-Mailman-Approved-At: Sun, 27 May 2007 07:42:18 -0400
Subject: Bugfix for Serial::isPending on WIN32
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.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://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
Date: Thu, 03 May 2007 11:12:23 -0000
X-Original-Date: Thu, 03 May 2007 13:05:34 +0200
X-List-Received-Date: Thu, 03 May 2007 11:12:23 -0000

--========GMX157841178190334691668
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

The overlapped handling in Serial::isPending is wrong on WIN32.
If you call isPending more than once with a timeout other than INFINITE the second call will always wait until the timeout elapsed even if there is data available.

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

--========GMX157841178190334691668
Content-Type: application/octet-stream; name="serial_isPending.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="serial_isPending.patch"

LS0tIHNyYy9zZXJpYWwuY3BwLm9yZwkyMDA3LTAxLTIzIDE3OjQ0OjQwLjAwMDAwMDAwMCArMDEw
MAorKysgc3JjL3NlcmlhbC5jcHAJMjAwNy0wNS0wMyAxMTo1MDoxNC4zMDE4NzUwMDAgKzAyMDAK
QEAgLTkyNSw2ICs5MjUsNyBAQCBib29sIFNlcmlhbDo6aXNQZW5kaW5nKFBlbmRpbmcgcGVuZGlu
ZywgCiAJCVRocmVhZDo6Q2FuY2VsIHNhdmUgPSBUaHJlYWQ6OmVudGVyQ2FuY2VsKCk7CiAJCU9W
RVJMQVBQRUQgb2w7CiAJCURXT1JEIGR3TWFzazsKKwkJRFdPUkQgZHdFdmVudHMgPSAwOwogCQlC
T09MIHN1YzsKIAogCQltZW1zZXQoJm9sLCAwLCBzaXplb2YoT1ZFUkxBUFBFRCkpOwpAQCAtOTM5
LDExICs5NDAsMTcgQEAgYm9vbCBTZXJpYWw6OmlzUGVuZGluZyhQZW5kaW5nIHBlbmRpbmcsIAog
CiAJCVNldENvbW1NYXNrKGRldiwgZHdNYXNrKTsKIAkJLy8gbGV0J3Mgd2FpdCBmb3IgZXZlbnQg
b3IgdGltZW91dAotCQlpZigoc3VjID0gV2FpdENvbW1FdmVudChkZXYsICZkd01hc2ssICZvbCkp
ID09IEZBTFNFKSB7CisJCWlmKChzdWMgPSBXYWl0Q29tbUV2ZW50KGRldiwgJmR3RXZlbnRzLCAm
b2wpKSA9PSBGQUxTRSkgewogCQkJaWYoR2V0TGFzdEVycm9yKCkgPT0gRVJST1JfSU9fUEVORElO
RykgeworCQkJCURXT1JEIHRyYW5zZmVycmVkOworCiAJCQkJZHdFcnJvciA9IFdhaXRGb3JTaW5n
bGVPYmplY3Qob2wuaEV2ZW50LCB0aW1lb3V0KTsKLQkJCQlzdWMgPSAoZHdFcnJvciA9PSBXQUlU
X09CSkVDVF8wKTsKLQkJCQlTZXRDb21tTWFzayhkZXYsIDApOworCQkJCWlmIChkd0Vycm9yICE9
IFdBSVRfT0JKRUNUXzApCisJCQkJCVNldENvbW1NYXNrKGRldiwgMCk7CisKKwkJCQlzdWMgPSBH
ZXRPdmVybGFwcGVkUmVzdWx0KGRldiwgJm9sLCAmdHJhbnNmZXJyZWQsIFRSVUUpOworCQkJCWlm
IChzdWMpCisJCQkJCXN1YyA9IChkd0V2ZW50cyAmIGR3TWFzaykgPyBUUlVFIDogRkFMU0U7CiAJ
CQkJfQogCQkJZWxzZQogCQkJCUNsZWFyQ29tbUVycm9yKGRldiwgJmR3RXJyb3IsICZjcyk7Cg==
--========GMX157841178190334691668--



