Re: [reSIProcate] IntergerCategory
The Content-Length header is a special case: it is calculated on-the-fly as the SipMessage is encoded. You can't override it. If you have no contents attached to the SipMessage, the Content-Length will be encoded as 0.
Best regards, Byron Campen
Thanks for your answer Byron. I did as you saidSipMessage *msg;msg->header(h_ContentLength).value() = 100;I verified the value of mValue in the Content-Length field, it was 100. But when I convert this SipMessage to char* using the following method and print the result, I have always "Content-Length: 0" in the SIP headerData data = ""> const char* result = data.c_str();
Do you have any ideas?
Thanks, Viet
----- Original Message ----From: Byron Campen <bcampen@xxxxxxxxxxxx>To: Tuan Viet Nguyen <ntvietv@xxxxxxxxx>Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxxxSent: Wednesday, July 4, 2007 10:32:37 AMSubject: Re: [reSIProcate] IntergerCategory To set IntegerCategory::mValue (or the more recent UInt32Category::mValue), you do the following:
IntegerCategory i; i.value()=100;
A specific example of this is setting a Max-Forwards header:
SipMessage msg; msg.header(h_MaxForwards).value()=20;
Best regards, Byron Campen
Hello,
I tried to set the value of the mValue attribut of an IntergerCategory object using param, but I did not find the name of the parameter in ParserCategory. Is it possible to do it like that?
IntegerCategory i; i.param(<"I dont know">) = 100 ;
Thanks Viet
It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar._______________________________________________ resiprocate-devel mailing list
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature