Add support for authentication and encryption

This commit is contained in:
Guillaume Meunier
2024-11-26 23:59:35 +01:00
committed by Patrick Nicolas
parent 447b77c35c
commit c6e773fd22
45 changed files with 1516 additions and 455 deletions
+13 -7
View File
@@ -27,16 +27,22 @@
#include <stdint.h>
#include <variant>
extern std::unique_ptr<wivrn::TCP> tcp;
namespace wivrn
{
class wivrn_connection;
}
extern std::unique_ptr<wivrn::wivrn_connection> connection;
namespace from_monado
{
struct headsdet_connected
{};
struct headsdet_disconnected
struct headset_connected
{};
using packets = std::variant<wivrn::from_headset::headset_info_packet, headsdet_connected, headsdet_disconnected>;
struct headset_disconnected
{};
using packets = std::variant<wivrn::from_headset::headset_info_packet, headset_connected, headset_disconnected>;
} // namespace from_monado
namespace to_monado
@@ -51,9 +57,9 @@ extern std::optional<wivrn::typed_socket<wivrn::UnixDatagram, to_monado::packets
std::optional<to_monado::packets> receive_from_main();
template <typename T>
void send_to_main(T && packet)
void send_to_main(T packet)
{
wivrn_ipc_socket_monado->send(std::forward<T>(packet));
wivrn_ipc_socket_monado->send(std::move(packet));
}
void init_cleanup_functions();