NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
be_process_mclistener.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to Title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10
11#ifndef __BE_PROCESS_MESSAGECENTERLISTENER__
12#define __BE_PROCESS_MESSAGECENTERLISTENER__
13
14#include <cstdint>
15#include <memory>
16
18#include <be_process_worker.h>
19
20namespace BiometricEvaluation
21{
22 namespace Process
23 {
26 {
27 public:
29 static const std::string PARAM_PORT;
30
31 int32_t
33
34 /* Default constructor. */
36 /* Default destructor. */
38
39 private:
41 uint16_t _port;
43 int _socket;
45 struct addrinfo *_addr;
47 std::shared_ptr<Process::ForkManager> _manager;
49 std::map<uint32_t, std::shared_ptr<WorkerController>>
50 _clientMap;
51
53 void
54 parseArgs();
55
57 void
58 spawnReceiver(
59 int clientSocket);
60
62 void
63 setupSocket();
64
66 void
67 listen();
68
70 int
71 accept();
72
74 void
75 tearDown();
76 };
77 }
78}
79
80#endif /* __BE_PROCESS_MESSAGECENTERLISTENER__ */
Accepts new connections and spawns message receivers.
static const std::string PARAM_PORT
Parameter used to pass port number.
int32_t workerMain()
The method that will get called to start execution by a ProcessManager.
An abstraction of an instance that performs work on given data.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...