summaryrefslogtreecommitdiff
path: root/src/ClientConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientConnection.cpp')
-rw-r--r--src/ClientConnection.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/ClientConnection.cpp b/src/ClientConnection.cpp
index 3bf93c3..da0cf9f 100644
--- a/src/ClientConnection.cpp
+++ b/src/ClientConnection.cpp
@@ -26,24 +26,19 @@ void ClientConnection::dump_request_data()
}
}
-bool ClientConnection::send(const HttpResponse& response, const char* message)
+bool ClientConnection::send(const HttpResponse& response)
{
if (!m_is_open)
return false;
- std::stringstream ss;
- ss << response.to_string()
- << "\r\n\r\n"
- << message;
-
- std::string result = ss.str();
+ std::string result = response.to_string();
write(m_socket_fd, result.c_str(), result.length());
return true;
}
-void ClientConnection::close()
+void ClientConnection::close_connection()
{
m_is_open = false;
- ::close(m_socket_fd);
+ close(m_socket_fd);
}