TURN Server  1.5
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
Public Member Functions | Protected Member Functions
turn::StunAttrResponsePort Class Reference

#include <TurnMsgLib.h>

Inheritance diagram for turn::StunAttrResponsePort:
turn::StunAttr

List of all members.

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)

Detailed Description

Change Request attribute class

Definition at line 490 of file TurnMsgLib.h.


Constructor & Destructor Documentation

Definition at line 492 of file TurnMsgLib.h.

                               : _rp(0) {
                setType(STUN_ATTRIBUTE_RESPONSE_PORT);
        }

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;
        }

Definition at line 508 of file TurnMsgLib.h.

{}

Member Function Documentation

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;
        }

The documentation for this class was generated from the following file: