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

Re: [reSIProcate] Silly SipMessage question


Quoting Shaun Dawson <scdawson@xxxxxxxxx>:

> OK, I know this is probably a really silly question, but is there a
> way to get at the contents of a SipMessage without using streams?

Most objects have some sort of stream insertion operator, but they're for, well,
 stream insertion.

How about SipMessage::getContents()?

> char *sipMessageContents(SipMessage &message) {
>           Data enc;
>           {
>                 DataStream str(enc);
>                 str << *message;
>           }
> 
>           return enc.c_str();
> }

For pendantic completeness, the above code enstreams the message headers, not
just the contents.

david