WebSocket++  0.8.3-dev
C++ websocket client/server library
Public Types | Public Member Functions | List of all members
websocketpp::random::random_device::int_generator< int_type, concurrency > Class Template Reference

Thread safe non-deterministic random integer generator. More...

#include <random_device.hpp>

Public Types

typedef concurrency::scoped_lock_type scoped_lock_type
typedef concurrency::mutex_type mutex_type

Public Member Functions

 int_generator ()
int_type operator() ()
 advances the engine's state and returns the generated value

Detailed Description

template<typename int_type, typename concurrency>
class websocketpp::random::random_device::int_generator< int_type, concurrency >

Thread safe non-deterministic random integer generator.

This template class provides thread safe non-deterministic random integer generation. Numbers are produced in a uniformly distributed range from the smallest to largest value that int_type can store.

Thread-safety is provided via locking based on the concurrency template parameter.

Non-deterministic RNG is provided via websocketpp::lib which uses either C++11 or Boost 1.47+'s random_device class.

Call operator() to generate the next number

Definition at line 53 of file random_device.hpp.

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