Loading...
Searching...
No Matches
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< message > | type
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.
message_ptr | get_message (frame::opcode::value op, size_t size)
| Get a message buffer with specified size and opcode.
bool | recycle (message *)
| Recycle a message.
message_ptr | get_message (size_t size) const
| Get a message buffer with specified size.
bool | recycle (message *msg)
| Recycle a message.

## 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

## message_ptr [1/2]

template<typename message>

typedef message::ptr websocketpp::message_buffer::alloc::con_msg_manager< message >::message_ptr

Definition at line 49 of file alloc.hpp.

## message_ptr [2/2]

template<typename message>

typedef message::ptr websocketpp::message_buffer::alloc::con_msg_manager< message >::message_ptr

Definition at line 165 of file pool.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.

## 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.

## type

template<typename message>

typedef con_msg_manager<message> websocketpp::message_buffer::alloc::con_msg_manager< message >::type

Definition at line 45 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.

## 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.

## 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.

## 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

  op | The opcode to use
  size | Minimum 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.

## 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

  size | Minimum 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.

## 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

  msg | The message to be recycled.

Returns
  true if the message was successfully recycled, false otherwse.

Definition at line 80 of file alloc.hpp.

## 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

  msg | The 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:

- websocketpp/message_buffer/alloc.hpp
- websocketpp/message_buffer/pool.hpp