Request
Request
#include <icy/turn/types.h>class RequestDefined in src/turn/include/icy/turn/types.h:61
Inherits:
Message
A STUN message annotated with the transport type and source/destination addresses needed for server-side routing and response generation.
List of all members
| Name | Kind | Owner |
|---|---|---|
transport | variable | Declared here |
localAddress | variable | Declared here |
remoteAddress | variable | Declared here |
hash | variable | Declared here |
Request | function | Declared here |
Message | function | Inherited from Message |
Message | function | Inherited from Message |
Message | function | Inherited from Message |
Message | function | Inherited from Message |
operator= | function | Inherited from Message |
operator= | function | Inherited from Message |
~Message | function | Inherited from Message |
clone | function | Inherited from Message |
setClass | function | Inherited from Message |
setMethod | function | Inherited from Message |
setTransactionID | function | Inherited from Message |
classType | function | Inherited from Message |
methodType | function | Inherited from Message |
transactionID | function | Inherited from Message |
size | function | Inherited from Message |
methodString | function | Inherited from Message |
classString | function | Inherited from Message |
errorString | function | Inherited from Message |
add | function | Inherited from Message |
add | function | Inherited from Message |
get | function | Inherited from Message |
get | function | Inherited from Message |
read | function | Inherited from Message |
write | function | Inherited from Message |
toString | function | Inherited from Message |
print | function | Inherited from Message |
className | function | Inherited from Message |
_class | variable | Inherited from Message |
_method | variable | Inherited from Message |
_size | variable | Inherited from Message |
_transactionID | variable | Inherited from Message |
_attrs | variable | Inherited from Message |
MethodType | enum | Inherited from Message |
ClassType | enum | Inherited from Message |
ErrorCodes | enum | Inherited from Message |
computeBodySize | function | Inherited from Message |
operator<< | friend | Inherited from IPacket |
opaque | variable | Inherited from IPacket |
info | variable | Inherited from IPacket |
flags | variable | Inherited from IPacket |
IPacket | function | Inherited from IPacket |
IPacket | function | Inherited from IPacket |
operator= | function | Inherited from IPacket |
clone | function | Inherited from IPacket |
~IPacket | function | Inherited from IPacket |
read | function | Inherited from IPacket |
write | function | Inherited from IPacket |
size | function | Inherited from IPacket |
hasData | function | Inherited from IPacket |
data | function | Inherited from IPacket |
constData | function | Inherited from IPacket |
className | function | Inherited from IPacket |
print | function | Inherited from IPacket |
Inherited from Message
| Kind | Name | Description |
|---|---|---|
function | Message | Constructs a default message (Request class, Undefined method) with a randomly generated 12-byte transaction ID. |
function | Message | Constructs a message with explicit class and method. |
function | Message | Deep-copy constructor; clones all attributes. |
function | Message noexcept | Move constructor. |
function | operator= | Deep-copy assignment; clones all attributes from that. |
function | operator= noexcept | Move assignment. |
function | ~Message virtual | |
function | clone virtual const override | |
function | setClass | Sets the message class field. |
function | setMethod | Sets the message method field. |
function | setTransactionID | Sets the 12-byte transaction ID. |
function | classType const | |
function | methodType const | |
function | transactionID const inline | |
function | size virtual const inline override | |
function | methodString const | |
function | classString const | |
function | errorString const | Maps a numeric error code to its canonical string description. |
function | add inline | Constructs an attribute of type T in-place and appends it to the message. Returns a reference to the new attribute for further configuration. |
function | add | Appends an attribute to the message, taking ownership via unique_ptr. |
function | get const | Returns the Nth attribute of the given type, or nullptr if not found. |
function | get const inline | Type-safe attribute accessor using the concrete attribute's TypeID. |
function | read virtual override | Parses a STUN/TURN packet from the given buffer. |
function | write virtual const override | Serialises this message into a STUN/TURN wire-format packet. |
function | toString const | |
function | print virtual const override | Writes the same representation as toString() to the given stream. |
function | className virtual const inline override | Returns the class name of this packet type for logging and diagnostics. |
variable | _class | |
variable | _method | |
variable | _size | Set by read(); write() uses computeBodySize() instead. |
variable | _transactionID | |
variable | _attrs | |
enum | MethodType | |
enum | ClassType | |
enum | ErrorCodes | |
function | computeBodySize const | Computes the wire body size from the current attribute list. |
Inherited from IPacket
| Kind | Name | Description |
|---|---|---|
friend | operator<< inline | Stream insertion operator; delegates to print(). |
variable | opaque | Optional type-safe context data. Use std::any_cast to retrieve. Lifetime of the stored value is tied to the packet's lifetime. |
variable | info | Optional extra information about the packet. |
variable | flags | Provides basic information about the packet. |
function | IPacket inline | |
function | IPacket inline | Copy constructor; clones the info object if present. |
function | operator= inline | Copy assignment; clones the info object if present. |
function | clone virtual const | Returns a heap-allocated deep copy of this packet. |
function | ~IPacket virtual | Defaulted destructor. |
function | read virtual | Read/parse to the packet from the given input buffer. The number of bytes read is returned. |
function | write virtual const | Copy/generate to the packet given output buffer. The number of bytes written can be obtained from the buffer. |
function | size virtual const inline | The size of the packet in bytes. |
function | hasData virtual const inline | Returns true if the packet has a non-null data pointer. |
function | data virtual const inline | The packet data pointer for buffered packets. |
function | constData virtual const inline | The const packet data pointer for buffered packets. |
function | className virtual const | Returns the class name of this packet type for logging and diagnostics. |
function | print virtual const inline | Prints a human-readable representation to the given stream. |
Public Attributes
| Return | Name | Description |
|---|---|---|
net::TransportType | transport | Protocol on which the request arrived (UDP or TCP). |
net::Address | localAddress | Server's local address that received the request. |
net::Address | remoteAddress | Client's remote address (used to build the 5-tuple). |
std::string | hash | Pre-computed MessageIntegrity key for signing responses. |
transport
net::TransportType transportDefined in src/turn/include/icy/turn/types.h:64
Protocol on which the request arrived (UDP or TCP).
localAddress
net::Address localAddressDefined in src/turn/include/icy/turn/types.h:65
Server's local address that received the request.
remoteAddress
net::Address remoteAddressDefined in src/turn/include/icy/turn/types.h:66
Client's remote address (used to build the 5-tuple).
hash
std::string hashDefined in src/turn/include/icy/turn/types.h:67
Pre-computed MessageIntegrity key for signing responses.
Public Methods
| Return | Name | Description |
|---|---|---|
Request inline | Constructs a Request by copying a parsed STUN message and annotating it with the transport context. |
Request
inline
inline Request(const stun::Message & message, net::TransportType transport, const net::Address & localAddress = net::Address(), const net::Address & remoteAddress = net::Address())Defined in src/turn/include/icy/turn/types.h:75
Constructs a Request by copying a parsed STUN message and annotating it with the transport context.
Parameters
messageParsed STUN message.transportTransport protocol on which the message arrived.localAddressServer-side local address.remoteAddressClient-side remote address.
