< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Getting string representation of SipMessage


Thanks Jason thats just what I was looking for. I notice in some of the test 
programs
you create a SipMessage from plaintext SIP using a Data something like:

Data txt("SIP text here");
SipMessage* msg(TestSupport::makeMessage(txt);

Is there away of doing that without using the TestSupport class?

-----Original Message-----
From: "Jason Fischl" <jason.fischl@xxxxxxxxx>
Sent: Saturday, January 3, 2009 3:57pm
To: james@xxxxxxxxxx
Cc: resiprocate-users@xxxxxxxxxxxxxxx
Subject: Re: [reSIProcate-users] Getting string representation of SipMessage

SipMessage msg;

Data dmsg = Data::from(msg);
const char* cmsg = dmsg.c_str();

You can use Data::from on anything that implements operator<<(ostream&
strm) as all of our objects do.

For more reference, see the wiki:
http://www.resiprocate.org/Data_Overview
http://www.resiprocate.org/Using_Data

Jason

On Sat, Jan 3, 2009 at 12:44 PM,  <james@xxxxxxxxxx> wrote:
> Is there a way to get a simple text representation preferably as a  C char 
> array or C++ std::string so I can printit out to the screen & log it for 
> debugging?
>
> I thought maybe SipMessage would have a str() method but it doesnt appear to.
>
> Thanks
>
>
>
> _______________________________________________
> resiprocate-users mailing list
> resiprocate-users@xxxxxxxxxxxxxxx
> List Archive: http://list.resiprocate.org/archive/resiprocate-users/
>