ServidorTFG/conexion.h
2020-06-01 23:23:23 +02:00

33 lines
681 B
C++

#ifndef CONEXION_H
#define CONEXION_H
#include <string>
#include "config_reader.h"
#include "data_acces.h"
using namespace std;
class conexion
{
public:
/**
* @brief conexion
* Object that launch the server and start the sessions
* @param conf Configuration file
*/
conexion(config_reader &conf);
/**
* @brief start_server
* Start the server
*/
virtual void start_server();
protected:
data_acces* data;
/**
* @brief create_socket
* Create the server socket
* @param port Port to listen the server
* @return File descritor to listen the new conexions
*/
int create_socket(int port);
config_reader* config;
};
#endif // CONEXION_H