client variables are const ref

This commit is contained in:
hugogogo
2022-08-08 15:36:16 +02:00
parent da1f4b6e37
commit 972f52ebc8
7 changed files with 80 additions and 68 deletions

View File

@@ -48,10 +48,10 @@ class Client
unsigned int status;
// getters
int get_cl_fd() const;
std::string get_cl_port() const;
std::string get_cl_ip() const;
listen_socket * get_cl_lsocket() const;
int get_cl_fd() const;
const std::string & get_cl_port() const;
const std::string & get_cl_ip() const;
const listen_socket * get_cl_lsocket() const;
// requests getters
http_method get_rq_method() const;
@@ -74,11 +74,11 @@ class Client
bool fill_script_path(std::string script);
private:
const int _fd;
const std::string _port;
const std::string _ip;
listen_socket * _lsocket;
struct Request _request;
const int _fd;
const std::string _port;
const std::string _ip;
const listen_socket * _lsocket;
struct Request _request;
void _parse_request_line( std::string rline );
void _parse_request_uri( std::string uri );