NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
websocketpp::message_buffer::alloc::con_msg_manager< message > Class Template Reference

A connection message manager that allocates a new message for each request. More...

#include <alloc.hpp>

Inheritance diagram for websocketpp::message_buffer::alloc::con_msg_manager< message >:
Collaboration diagram for websocketpp::message_buffer::alloc::con_msg_manager< message >:

Public Types

typedef con_msg_manager< messagetype
 
typedef lib::shared_ptr< con_msg_managerptr
 
typedef lib::weak_ptr< con_msg_managerweak_ptr
 
typedef message::ptr message_ptr
 
typedef lib::shared_ptr< con_msg_managerptr
 
typedef lib::weak_ptr< con_msg_managerweak_ptr
 
typedef message::ptr message_ptr
 

Public Member Functions

message_ptr get_message ()
 Get an empty message buffer. More...
 
message_ptr get_message (frame::opcode::value op, size_t size)
 Get a message buffer with specified size and opcode. More...
 
bool recycle (message *)
 Recycle a message. More...
 
message_ptr get_message (size_t size) const
 Get a message buffer with specified size. More...
 
bool recycle (message *msg)
 Recycle a message. More...
 

Detailed Description

template<typename message>
class websocketpp::message_buffer::alloc::con_msg_manager< message >

A connection message manager that allocates a new message for each request.

Definition at line 41 of file alloc.hpp.

Member Typedef Documentation

◆ type

Definition at line 45 of file alloc.hpp.

◆ ptr [1/2]

template<typename message >
typedef lib::shared_ptr<con_msg_manager> websocketpp::message_buffer::alloc::con_msg_manager< message >::ptr

Definition at line 46 of file alloc.hpp.

◆ weak_ptr [1/2]

template<typename message >
typedef lib::weak_ptr<con_msg_manager> websocketpp::message_buffer::alloc::con_msg_manager< message >::weak_ptr

Definition at line 47 of file alloc.hpp.

◆ message_ptr [1/2]

Definition at line 49 of file alloc.hpp.

◆ ptr [2/2]

template<typename message >
typedef lib::shared_ptr<con_msg_manager> websocketpp::message_buffer::alloc::con_msg_manager< message >::ptr

Definition at line 162 of file pool.hpp.

◆ weak_ptr [2/2]

template<typename message >
typedef lib::weak_ptr<con_msg_manager> websocketpp::message_buffer::alloc::con_msg_manager< message >::weak_ptr

Definition at line 163 of file pool.hpp.

◆ message_ptr [2/2]

Definition at line 165 of file pool.hpp.

Member Function Documentation

◆ get_message() [1/3]

template<typename message >
message_ptr websocketpp::message_buffer::alloc::con_msg_manager< message >::get_message ( )
inline

Get an empty message buffer.

Returns
A shared pointer to an empty new message

Definition at line 55 of file alloc.hpp.

Referenced by main().

◆ get_message() [2/3]

template<typename message >
message_ptr websocketpp::message_buffer::alloc::con_msg_manager< message >::get_message ( frame::opcode::value  op,
size_t  size 
)
inline

Get a message buffer with specified size and opcode.

Parameters
opThe opcode to use
sizeMinimum size in bytes to request for the message payload.
Returns
A shared pointer to a new message with specified size.

Definition at line 66 of file alloc.hpp.

◆ recycle() [1/2]

template<typename message >
bool websocketpp::message_buffer::alloc::con_msg_manager< message >::recycle ( message )
inline

Recycle a message.

This method shouldn't be called. If it is, return false to indicate an error. The rest of the method recycle chain should notice this and free the memory.

Parameters
msgThe message to be recycled.
Returns
true if the message was successfully recycled, false otherwse.

Definition at line 80 of file alloc.hpp.

◆ get_message() [3/3]

template<typename message >
message_ptr websocketpp::message_buffer::alloc::con_msg_manager< message >::get_message ( size_t  size) const
inline

Get a message buffer with specified size.

Parameters
sizeMinimum size in bytes to request for the message payload.
Returns
A shared pointer to a new message with specified size.

Definition at line 173 of file pool.hpp.

References nonstd::span_lite::size().

◆ recycle() [2/2]

template<typename message >
bool websocketpp::message_buffer::alloc::con_msg_manager< message >::recycle ( message msg)
inline

Recycle a message.

This method shouldn't be called. If it is, return false to indicate an error. The rest of the method recycle chain should notice this and free the memory.

Parameters
msgThe message to be recycled.
Returns
true if the message was successfully recycled, false otherwse.

Definition at line 187 of file pool.hpp.


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