mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 10:56:30 +00:00
writer as unique ptr
This commit is contained in:
parent
253b182c45
commit
7806b64783
@ -1,5 +1,6 @@
|
||||
#include "rpc_server.hpp"
|
||||
#include "json.hpp"
|
||||
#include <memory>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
@ -57,7 +58,7 @@ auto slige_rpc::RpcServer<Functor>::listen() -> Res<Unit>
|
||||
continue;
|
||||
}
|
||||
auto req = sliger::json::parse_json(message);
|
||||
auto writer = BufferedWriter(client);
|
||||
auto writer = std::make_unique<BufferedWriter>(client);
|
||||
this->functor(req, std::move(writer));
|
||||
message.clear();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user