#include <TurnMsgLib.h>
Public Member Functions | |
| StunAttrPadding () | |
| StunAttrPadding (const StunAttrIterator &iter) throw (WrongStunAttrFormatException, EndOfStunMsgException) | |
| virtual | ~StunAttrPadding () |
| u16bits | getPadding () const |
| void | setPadding (u16bits p) |
Protected Member Functions | |
| virtual int | addToBuffer (u08bits *buffer, size_t &sz) throw (WrongStunAttrFormatException, WrongStunBufferFormatException) |
Padding attribute class
Definition at line 526 of file TurnMsgLib.h.
| turn::StunAttrPadding::StunAttrPadding | ( | ) | [inline] |
Definition at line 528 of file TurnMsgLib.h.
: _p(0) {
setType(STUN_ATTRIBUTE_PADDING);
}
| turn::StunAttrPadding::StunAttrPadding | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 531 of file TurnMsgLib.h.
:
StunAttr(iter) {
if(iter.eof())
throw EndOfStunMsgException();
int p = stun_attr_get_padding_len_str(getSar(iter));
if(p<0) {
throw WrongStunAttrFormatException();
}
_p = (u16bits)p;
}
| virtual turn::StunAttrPadding::~StunAttrPadding | ( | ) | [inline, virtual] |
Definition at line 544 of file TurnMsgLib.h.
{}
| virtual int turn::StunAttrPadding::addToBuffer | ( | u08bits * | buffer, |
| size_t & | sz | ||
| ) | throw (WrongStunAttrFormatException, WrongStunBufferFormatException) [inline, protected, virtual] |
Virtual function member to add attribute to a raw buffer
Reimplemented from turn::StunAttr.
Definition at line 555 of file TurnMsgLib.h.
{
return stun_attr_add_padding_str(buffer, &sz, _p);
}
| u16bits turn::StunAttrPadding::getPadding | ( | ) | const [inline] |
Definition at line 545 of file TurnMsgLib.h.
{
return _p;
}
| void turn::StunAttrPadding::setPadding | ( | u16bits | p | ) | [inline] |
1.8.0