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