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

#include <TurnMsgLib.h>

Inheritance diagram for turn::StunAttrEvenPort:
turn::StunAttr

List of all members.

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)

Detailed Description

Even port attribute class

Definition at line 344 of file TurnMsgLib.h.


Constructor & Destructor Documentation

Definition at line 346 of file TurnMsgLib.h.

                           : _ep(0) {
                setType(STUN_ATTRIBUTE_EVEN_PORT);
        }

Definition at line 349 of file TurnMsgLib.h.

                                                                           :
                StunAttr(iter) {

                if(iter.eof())
                        throw EndOfStunMsgException();
                _ep = stun_attr_get_even_port(getSar(iter));
        }
virtual turn::StunAttrEvenPort::~StunAttrEvenPort ( ) [inline, virtual]

Definition at line 357 of file TurnMsgLib.h.

{}

Member Function Documentation

virtual int turn::StunAttrEvenPort::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 365 of file TurnMsgLib.h.

                                                                                                                                 {
                return stun_attr_add_str(buffer, &sz, STUN_ATTRIBUTE_EVEN_PORT, &_ep, 1);
        }
u08bits turn::StunAttrEvenPort::getEvenPort ( ) const [inline]

Definition at line 358 of file TurnMsgLib.h.

                                    {
                return _ep;
        }
void turn::StunAttrEvenPort::setEvenPort ( u08bits  ep) [inline]

Definition at line 361 of file TurnMsgLib.h.

                                     {
                _ep = ep;
        }

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