The code should properly handle extra white space trailing a message, Hiram submitted a patch for that.
FYI - You can enable output of the socket activity to the Console by going into Activemq/network/SocketInputStream.cpp Activemq/network/SocketOutputStream.cpp And setting the debug flag to true in the constructor. Give the newest code drop a try and see what happens. ----------------------------------------- Timothy A. Bish Sensis Corporation ----------------------------------------- > -----Original Message----- > From: kevinba [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 19, 2006 10:49 AM > To: [email protected] > Subject: RE: Help running CPP Example > > > Looking at cpp code and the packet is where the problem is. it appears > after > the header is read you read the the body and llok for a NULL to indicate > your done. but the packet has 1 more character after the null it has a > line > feed that the broker is putting in. > > > StompCommandReader::readStompBody > > // Content length was either zero, or not set, so we read until the > > // first null is encounted. > > > Dump of the received packet. > > > 0x01279E48 43 4f 4e 4e 45 43 54 45 44 0a 72 65 73 70 6f 6e 73 65 2d 69 64 > 3a 31 0a 73 65 73 73 69 6f CONNECTED.response-id:1.sessio > > 0x01279E66 6e 3a 63 35 39 61 61 63 66 31 2d 63 64 34 33 2d 34 38 65 64 2d > 61 39 62 64 2d 36 37 64 62 n:c59aacf1-cd43-48ed-a9bd-67db > > 0x01279E84 32 38 33 64 65 33 30 36 0a 0a 00 0a cd cd cd cd cd cd cd cd cd > cd cd cd cd cd cd cd cd cd 283de306.... > > > > The broker is putting in an extra carriage line or the cpp is suppose to > do > something with that. That part I'm not sure about. > > > > Let me know, > > > -- > View this message in context: http://www.nabble.com/Help-running-CPP- > Example-tf1957518.html#a5397672 > Sent from the ActiveMQ - User forum at Nabble.com.
