#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 251 of file TurnMsgLib.h.
StunAttrEvenPort::StunAttrEvenPort | ( | ) | [inline] |
Definition at line 253 of file TurnMsgLib.h.
: _ep(0) {}
StunAttrEvenPort::StunAttrEvenPort | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 254 of file TurnMsgLib.h.
: StunAttr(iter) { if(iter.eof()) throw EndOfStunMsgException(); _ep = stun_attr_get_even_port(getSar(iter)); }
virtual StunAttrEvenPort::~StunAttrEvenPort | ( | ) | [inline, virtual] |
Definition at line 262 of file TurnMsgLib.h.
{}
virtual int StunAttrEvenPort::addToBuffer | ( | u08bits * | buffer, |
size_t & | sz | ||
) | throw (WrongStunAttrFormatException, WrongStunBufferFormatException) [inline, protected, virtual] |
Reimplemented from StunAttr.
Definition at line 270 of file TurnMsgLib.h.
{ return stun_attr_add_str(buffer, &sz, STUN_ATTRIBUTE_EVEN_PORT, &_ep, 1); }
u08bits StunAttrEvenPort::getEvenPort | ( | ) | const [inline] |
Definition at line 263 of file TurnMsgLib.h.
{
return _ep;
}
void StunAttrEvenPort::setEvenPort | ( | u08bits | ep | ) | [inline] |
Definition at line 266 of file TurnMsgLib.h.
{ _ep = ep; }