mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 18:36:31 +00:00
move writer
This commit is contained in:
parent
4f9a671bdc
commit
253b182c45
@ -58,7 +58,7 @@ auto slige_rpc::RpcServer<Functor>::listen() -> Res<Unit>
|
|||||||
}
|
}
|
||||||
auto req = sliger::json::parse_json(message);
|
auto req = sliger::json::parse_json(message);
|
||||||
auto writer = BufferedWriter(client);
|
auto writer = BufferedWriter(client);
|
||||||
this->functor(req, writer);
|
this->functor(req, std::move(writer));
|
||||||
message.clear();
|
message.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,10 @@ 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…
Reference in New Issue
Block a user