blob: 69433a1e1c6be397ad0babf30a029b1f6d546158 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/*************************************************
* AEP Connection Management Header File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#ifndef BOTAN_EXT_AEP_CONNECTION_H__
#define BOTAN_EXT_AEP_CONNECTION_H__
#include <botan/eng_aep.h>
#include <botan/mutex.h>
namespace Botan {
/*************************************************
* AEP Connection *
*************************************************/
class AEP_Connection
{
public:
operator u32bit () { return this_connection; }
static void close_all_connections();
AEP_Connection();
~AEP_Connection();
private:
struct Connection_Info { u32bit id; bool in_use; };
static const u32bit MAX_CACHED_CONNECTIONS = 8;
static std::vector<Connection_Info> pool;
u32bit this_connection;
};
}
#endif
|