#include <TurnMsgLib.h>
Public Member Functions | |
| StunAttrAddr (u16bits attr_type=0) | |
| 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) |
This attribute class is used for all address attributes
Definition at line 407 of file TurnMsgLib.h.
| turn::StunAttrAddr::StunAttrAddr | ( | u16bits | attr_type = 0 | ) | [inline] |
Definition at line 409 of file TurnMsgLib.h.
{
addr_set_any(&_addr);
setType(attr_type);
}
| turn::StunAttrAddr::StunAttrAddr | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 413 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 turn::StunAttrAddr::~StunAttrAddr | ( | ) | [inline, virtual] |
Definition at line 425 of file TurnMsgLib.h.
{}
| virtual int turn::StunAttrAddr::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 433 of file TurnMsgLib.h.
{
return stun_attr_add_addr_str(buffer, &sz, getType(), &_addr);
}
| void turn::StunAttrAddr::getAddr | ( | ioa_addr & | addr | ) | const [inline] |
Definition at line 426 of file TurnMsgLib.h.
{
addr_cpy(&addr,&_addr);
}
| void turn::StunAttrAddr::setAddr | ( | ioa_addr & | addr | ) | [inline] |
Definition at line 429 of file TurnMsgLib.h.
{
addr_cpy(&_addr,&addr);
}
1.8.0