Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 93972 invoked from network); 24 Oct 2010 23:51:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Oct 2010 23:51:38 -0000 Received: (qmail 31341 invoked by uid 500); 24 Oct 2010 23:51:38 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 31305 invoked by uid 500); 24 Oct 2010 23:51:37 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 31297 invoked by uid 99); 24 Oct 2010 23:51:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Oct 2010 23:51:37 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.43] (HELO mail-qw0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Oct 2010 23:51:31 +0000 Received: by qwj9 with SMTP id 9so1195145qwj.2 for ; Sun, 24 Oct 2010 16:51:09 -0700 (PDT) Received: by 10.229.218.143 with SMTP id hq15mr5482688qcb.34.1287964268998; Sun, 24 Oct 2010 16:51:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.219.203 with HTTP; Sun, 24 Oct 2010 16:50:48 -0700 (PDT) From: Oscar Pernas Date: Mon, 25 Oct 2010 01:50:48 +0200 Message-ID: Subject: ACTIVEMQ-CPP ReadBytes of streammessage To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=0016363b90d4bcc74a0493658c41 --0016363b90d4bcc74a0493658c41 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all, Im using streamMessage to send data. I dont know why, but if I send something by this way: streamMessage->writeString(key); streamMessage->writeBytes(bytesParameter->getValue()); When i catch the message on reception I need to do two readBytes to catch the bytes sent, like this: std::string key=3DstreamMessage->readString(); int sizeBytesData=3DpacketDesc.at(++it); std::vector data(sizeBytesData); streamMessage->readBytes(data); streamMessage->readBytes(data); Any clue? --=20 =D3scar Pernas Plaza. --0016363b90d4bcc74a0493658c41--