#include <TurnMsgLib.h>
Public Member Functions | |
StunAttrResponsePort () | |
StunAttrResponsePort (const StunAttrIterator &iter) throw (WrongStunAttrFormatException, EndOfStunMsgException) | |
virtual | ~StunAttrResponsePort () |
u16bits | getResponsePort () const |
void | setResponsePort (u16bits p) |
Protected Member Functions | |
virtual int | addToBuffer (u08bits *buffer, size_t &sz) throw (WrongStunAttrFormatException, WrongStunBufferFormatException) |
Change Request attribute class
Definition at line 490 of file TurnMsgLib.h.
turn::StunAttrResponsePort::StunAttrResponsePort | ( | ) | [inline] |
Definition at line 492 of file TurnMsgLib.h.
: _rp(0) { setType(STUN_ATTRIBUTE_RESPONSE_PORT); }
turn::StunAttrResponsePort::StunAttrResponsePort | ( | const StunAttrIterator & | iter | ) | throw (WrongStunAttrFormatException, EndOfStunMsgException) [inline] |
Definition at line 495 of file TurnMsgLib.h.
: StunAttr(iter) { if(iter.eof()) throw EndOfStunMsgException(); int rp = stun_attr_get_response_port_str(getSar(iter)); if(rp<0) { throw WrongStunAttrFormatException(); } _rp = (u16bits)rp; }
virtual turn::StunAttrResponsePort::~StunAttrResponsePort | ( | ) | [inline, virtual] |
Definition at line 508 of file TurnMsgLib.h.
{}
virtual int turn::StunAttrResponsePort::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 516 of file TurnMsgLib.h.
{ return stun_attr_add_response_port_str(buffer, &sz, _rp); }
u16bits turn::StunAttrResponsePort::getResponsePort | ( | ) | const [inline] |
Definition at line 509 of file TurnMsgLib.h.
{
return _rp;
}
void turn::StunAttrResponsePort::setResponsePort | ( | u16bits | p | ) | [inline] |
Definition at line 512 of file TurnMsgLib.h.
{ _rp = p; }