WebSocket++  0.8.0-dev
C++ websocket client/server library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | List of all members
websocketpp::message_buffer::alloc::con_msg_manager< message > Class Template Reference

#include <alloc.hpp>

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

Public Types

typedef con_msg_manager< messagetype
 
typedef lib::shared_ptr
< con_msg_manager
ptr
 
typedef lib::weak_ptr
< con_msg_manager
weak_ptr
 
typedef message::ptr message_ptr
 
typedef lib::shared_ptr
< con_msg_manager
ptr
 
typedef lib::weak_ptr
< con_msg_manager
weak_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 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.

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 >
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 )
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 >
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: