NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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

Definition at line 45 of file alloc.hpp.

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.

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.

Definition at line 49 of file alloc.hpp.

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.

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.

Definition at line 165 of file pool.hpp.

Member Function Documentation

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().

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.

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.

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.

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: