10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
HTTPResponse.h
1
#ifndef TENDUKE_HTTP_SERVER_HTTPRESPONSE_H
2
#define TENDUKE_HTTP_SERVER_HTTPRESPONSE_H
3
4
#include "osa/Socket.h"
5
6
#include <memory>
7
#include <string>
8
9
namespace
tenduke
{
namespace
http
{
namespace
server
{
10
14
class
HTTPResponse
15
{
16
public
:
21
explicit
HTTPResponse
(
const
std::shared_ptr<tenduke::osa::Socket> &socket)
22
: socket(socket)
23
{}
24
29
void
write
(
const
std::string &
string
)
30
{
31
socket->write(
string
.c_str(),
string
.length());
32
}
33
34
private
:
35
const
std::shared_ptr<tenduke::osa::Socket> socket;
36
};
37
38
}}}
39
40
#endif
//TENDUKE_HTTP_SERVER_HTTPRESPONSE_H
tenduke::http::server::HTTPResponse::HTTPResponse
HTTPResponse(const std::shared_ptr< tenduke::osa::Socket > &socket)
Constructs new instance.
Definition
HTTPResponse.h:21
tenduke::http::server::HTTPResponse::write
void write(const std::string &string)
Writes following string as response.
Definition
HTTPResponse.h:29
tenduke::http::server
Simple HTTP-server.
Definition
AbstractHTTPServer.h:15
tenduke::http
HTTP-related services.
Definition
BadRequest.h:6
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
oidc
osbrowser
src
http
server
HTTPResponse.h
Generated by
1.17.0