Home
TURN module (rfc5766)

Request

A STUN message annotated with the transport type and source/destination addresses needed for server-side routing and res

Request

#include <icy/turn/types.h>
class Request

Defined 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

NameKindOwner
transportvariableDeclared here
localAddressvariableDeclared here
remoteAddressvariableDeclared here
hashvariableDeclared here
RequestfunctionDeclared here
MessagefunctionInherited from Message
MessagefunctionInherited from Message
MessagefunctionInherited from Message
MessagefunctionInherited from Message
operator=functionInherited from Message
operator=functionInherited from Message
~MessagefunctionInherited from Message
clonefunctionInherited from Message
setClassfunctionInherited from Message
setMethodfunctionInherited from Message
setTransactionIDfunctionInherited from Message
classTypefunctionInherited from Message
methodTypefunctionInherited from Message
transactionIDfunctionInherited from Message
sizefunctionInherited from Message
methodStringfunctionInherited from Message
classStringfunctionInherited from Message
errorStringfunctionInherited from Message
addfunctionInherited from Message
addfunctionInherited from Message
getfunctionInherited from Message
getfunctionInherited from Message
readfunctionInherited from Message
writefunctionInherited from Message
toStringfunctionInherited from Message
printfunctionInherited from Message
classNamefunctionInherited from Message
_classvariableInherited from Message
_methodvariableInherited from Message
_sizevariableInherited from Message
_transactionIDvariableInherited from Message
_attrsvariableInherited from Message
MethodTypeenumInherited from Message
ClassTypeenumInherited from Message
ErrorCodesenumInherited from Message
computeBodySizefunctionInherited from Message
operator<<friendInherited from IPacket
opaquevariableInherited from IPacket
infovariableInherited from IPacket
flagsvariableInherited from IPacket
IPacketfunctionInherited from IPacket
IPacketfunctionInherited from IPacket
operator=functionInherited from IPacket
clonefunctionInherited from IPacket
~IPacketfunctionInherited from IPacket
readfunctionInherited from IPacket
writefunctionInherited from IPacket
sizefunctionInherited from IPacket
hasDatafunctionInherited from IPacket
datafunctionInherited from IPacket
constDatafunctionInherited from IPacket
classNamefunctionInherited from IPacket
printfunctionInherited from IPacket

Inherited from Message

KindNameDescription
functionMessageConstructs a default message (Request class, Undefined method) with a randomly generated 12-byte transaction ID.
functionMessageConstructs a message with explicit class and method.
functionMessageDeep-copy constructor; clones all attributes.
functionMessage noexceptMove constructor.
functionoperator=Deep-copy assignment; clones all attributes from that.
functionoperator= noexceptMove assignment.
function~Message virtual
functionclone virtual const override
functionsetClassSets the message class field.
functionsetMethodSets the message method field.
functionsetTransactionIDSets the 12-byte transaction ID.
functionclassType const
functionmethodType const
functiontransactionID const inline
functionsize virtual const inline override
functionmethodString const
functionclassString const
functionerrorString constMaps a numeric error code to its canonical string description.
functionadd inlineConstructs an attribute of type T in-place and appends it to the message. Returns a reference to the new attribute for further configuration.
functionaddAppends an attribute to the message, taking ownership via unique_ptr.
functionget constReturns the Nth attribute of the given type, or nullptr if not found.
functionget const inlineType-safe attribute accessor using the concrete attribute's TypeID.
functionread virtual overrideParses a STUN/TURN packet from the given buffer.
functionwrite virtual const overrideSerialises this message into a STUN/TURN wire-format packet.
functiontoString const
functionprint virtual const overrideWrites the same representation as toString() to the given stream.
functionclassName virtual const inline overrideReturns the class name of this packet type for logging and diagnostics.
variable_class
variable_method
variable_sizeSet by read(); write() uses computeBodySize() instead.
variable_transactionID
variable_attrs
enumMethodType
enumClassType
enumErrorCodes
functioncomputeBodySize constComputes the wire body size from the current attribute list.

Inherited from IPacket

KindNameDescription
friendoperator<< inlineStream insertion operator; delegates to print().
variableopaqueOptional type-safe context data. Use std::any_cast to retrieve. Lifetime of the stored value is tied to the packet's lifetime.
variableinfoOptional extra information about the packet.
variableflagsProvides basic information about the packet.
functionIPacket inline
functionIPacket inlineCopy constructor; clones the info object if present.
functionoperator= inlineCopy assignment; clones the info object if present.
functionclone virtual constReturns a heap-allocated deep copy of this packet.
function~IPacket virtualDefaulted destructor.
functionread virtualRead/parse to the packet from the given input buffer. The number of bytes read is returned.
functionwrite virtual constCopy/generate to the packet given output buffer. The number of bytes written can be obtained from the buffer.
functionsize virtual const inlineThe size of the packet in bytes.
functionhasData virtual const inlineReturns true if the packet has a non-null data pointer.
functiondata virtual const inlineThe packet data pointer for buffered packets.
functionconstData virtual const inlineThe const packet data pointer for buffered packets.
functionclassName virtual constReturns the class name of this packet type for logging and diagnostics.
functionprint virtual const inlinePrints a human-readable representation to the given stream.

Public Attributes

ReturnNameDescription
net::TransportTypetransportProtocol on which the request arrived (UDP or TCP).
net::AddresslocalAddressServer's local address that received the request.
net::AddressremoteAddressClient's remote address (used to build the 5-tuple).
std::stringhashPre-computed MessageIntegrity key for signing responses.

transport

net::TransportType transport

Defined in src/turn/include/icy/turn/types.h:64

Protocol on which the request arrived (UDP or TCP).


localAddress

net::Address localAddress

Defined in src/turn/include/icy/turn/types.h:65

Server's local address that received the request.


remoteAddress

net::Address remoteAddress

Defined in src/turn/include/icy/turn/types.h:66

Client's remote address (used to build the 5-tuple).


hash

std::string hash

Defined in src/turn/include/icy/turn/types.h:67

Pre-computed MessageIntegrity key for signing responses.

Public Methods

ReturnNameDescription
Request inlineConstructs 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

  • message Parsed STUN message.

  • transport Transport protocol on which the message arrived.

  • localAddress Server-side local address.

  • remoteAddress Client-side remote address.