Reduce some copies in serialization

Also update a bunch of stuff
This commit is contained in:
Patrick Nicolas
2023-11-22 00:00:55 +01:00
parent c799fa6aa4
commit 8b0895913b
22 changed files with 805 additions and 820 deletions
+1 -11
View File
@@ -47,7 +47,7 @@ wivrn_connection::wivrn_connection(TCP && tcp) :
stream.bind(port);
control.send(to_headset::control_packets(to_headset::handshake{}));
control.send(to_headset::handshake{});
while (true)
{
@@ -98,16 +98,6 @@ wivrn_connection::wivrn_connection(TCP && tcp) :
}
}
void wivrn_connection::send_control(const to_headset::control_packets & packet)
{
control.send(packet);
}
void wivrn_connection::send_stream(const to_headset::stream_packets & packet)
{
stream.send(packet);
}
std::optional<from_headset::control_packets> wivrn_connection::poll_control(int timeout)
{
pollfd fds{};