#include <TurnMsgLib.h>
Public Member Functions | |
StunAttrEvenPort () | |
StunAttrEvenPort (const StunAttrIterator &iter) throw (WrongStunAttrFormatException, EndOfStunMsgException) | |
virtual | ~StunAttrEvenPort () |
u08bits | getEvenPort () const |
void | setEvenPort (u08bits ep) |
Protected Member Functions | |
virtual int | addToBuffer (u08bits *buffer, size_t &sz) throw (WrongStunAttrFormatException, WrongStunBufferFormatException) |
Even port attribute class
Definition at line 344 of file TurnMsgLib.h.
turn::StunAttrEvenPort::StunAttrEvenPort | ( | ) | [inline] |
Definition at line 346 of file TurnMsgLib.h.
: _ep(0) { setType(STUN_ATTRIBUTE_EVEN_PORT); }
turn::StunAttrEvenPort::StunAttrEvenPort | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 349 of file TurnMsgLib.h.
: StunAttr(iter) { if(iter.eof()) throw EndOfStunMsgException(); _ep = stun_attr_get_even_port(getSar(iter)); }
virtual turn::StunAttrEvenPort::~StunAttrEvenPort | ( | ) | [inline, virtual] |
Definition at line 357 of file TurnMsgLib.h.
{}
virtual int turn::StunAttrEvenPort::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 365 of file TurnMsgLib.h.
{ return stun_attr_add_str(buffer, &sz, STUN_ATTRIBUTE_EVEN_PORT, &_ep, 1); }
u08bits turn::StunAttrEvenPort::getEvenPort | ( | ) | const [inline] |
Definition at line 358 of file TurnMsgLib.h.
{
return _ep;
}
void turn::StunAttrEvenPort::setEvenPort | ( | u08bits | ep | ) | [inline] |
Definition at line 361 of file TurnMsgLib.h.
{ _ep = ep; }