#include <TurnMsgLib.h>
Public Member Functions | |
StunAttrAddr () | |
StunAttrAddr (const StunAttrIterator &iter) throw (WrongStunAttrFormatException, EndOfStunMsgException) | |
virtual | ~StunAttrAddr () |
void | getAddr (ioa_addr &addr) const |
void | setAddr (ioa_addr &addr) |
Protected Member Functions | |
virtual int | addToBuffer (u08bits *buffer, size_t &sz) throw (WrongStunAttrFormatException, WrongStunBufferFormatException) |
Addr attribute class
Definition at line 310 of file TurnMsgLib.h.
StunAttrAddr::StunAttrAddr | ( | ) | [inline] |
Definition at line 312 of file TurnMsgLib.h.
{ addr_set_any(&_addr); }
StunAttrAddr::StunAttrAddr | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 315 of file TurnMsgLib.h.
: StunAttr(iter) { if(iter.eof()) throw EndOfStunMsgException(); size_t sz = 0; const u08bits *buf = iter.getRawBuffer(sz); if(stun_attr_get_addr_str(buf,sz,getSar(iter),&_addr,NULL)<0) { throw WrongStunAttrFormatException(); } }
virtual StunAttrAddr::~StunAttrAddr | ( | ) | [inline, virtual] |
Definition at line 327 of file TurnMsgLib.h.
{}
virtual int StunAttrAddr::addToBuffer | ( | u08bits * | buffer, |
size_t & | sz | ||
) | throw (WrongStunAttrFormatException, WrongStunBufferFormatException) [inline, protected, virtual] |
Reimplemented from StunAttr.
Definition at line 335 of file TurnMsgLib.h.
{ return stun_attr_add_addr_str(buffer, &sz, getType(), &_addr); }
void StunAttrAddr::getAddr | ( | ioa_addr & | addr | ) | const [inline] |
Definition at line 328 of file TurnMsgLib.h.
{ addr_cpy(&addr,&_addr); }
void StunAttrAddr::setAddr | ( | ioa_addr & | addr | ) | [inline] |
Definition at line 331 of file TurnMsgLib.h.
{ addr_cpy(&_addr,&addr); }