Compare commits
No commits in common. "7806b64783f2f398676f98269bbfe5289db2c823" and "4f9a671bdc1d4e6c25397eb23f523a5849e013a1" have entirely different histories.
7806b64783
...
4f9a671bdc
@ -1,6 +1,5 @@
|
|||||||
#include "rpc_server.hpp"
|
#include "rpc_server.hpp"
|
||||||
#include "json.hpp"
|
#include "json.hpp"
|
||||||
#include <memory>
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -58,8 +57,8 @@ auto slige_rpc::RpcServer<Functor>::listen() -> Res<Unit>
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto req = sliger::json::parse_json(message);
|
auto req = sliger::json::parse_json(message);
|
||||||
auto writer = std::make_unique<BufferedWriter>(client);
|
auto writer = BufferedWriter(client);
|
||||||
this->functor(req, std::move(writer));
|
this->functor(req, writer);
|
||||||
message.clear();
|
message.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,6 @@ public:
|
|||||||
: fd(fd)
|
: fd(fd)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
BufferedWriter(const BufferedWriter&) = delete;
|
|
||||||
BufferedWriter operator=(const BufferedWriter&) = delete;
|
|
||||||
BufferedWriter(BufferedWriter&&) = delete;
|
|
||||||
BufferedWriter operator=(BufferedWriter&&) = delete;
|
|
||||||
~BufferedWriter() { close(fd); }
|
~BufferedWriter() { close(fd); }
|
||||||
|
|
||||||
auto flush() -> Res<size_t>;
|
auto flush() -> Res<size_t>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user