mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 18:16:31 +00:00
writer as unique ptr
This commit is contained in:
parent
253b182c45
commit
7806b64783
@ -1,5 +1,6 @@
|
|||||||
#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>
|
||||||
@ -57,7 +58,7 @@ 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 = BufferedWriter(client);
|
auto writer = std::make_unique<BufferedWriter>(client);
|
||||||
this->functor(req, std::move(writer));
|
this->functor(req, std::move(writer));
|
||||||
message.clear();
|
message.clear();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user