feat: work on adding conclusion receiver to client
This commit is contained in:
parent
7b045fb95e
commit
ab226045a5
2 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "ydi_client.h"
|
||||
#include "core/string/print_string.h"
|
||||
#include "core/templates/fixed_vector.h"
|
||||
#include "you_done_it/ydi_networking.h"
|
||||
#include "zmq.hpp"
|
||||
#include "zmq_addon.hpp"
|
||||
|
|
@ -14,12 +15,12 @@ struct Connection {
|
|||
std::optional<zmq::context_t> context{ std::nullopt };
|
||||
std::optional<zmq::socket_t> socket{ std::nullopt };
|
||||
std::recursive_mutex mtx;
|
||||
std::optional<FixedVector<NetworkData::ClueID, 3>> conclusion{ std::nullopt };
|
||||
std::atomic<NetworkData::ConnectionStatus> status;
|
||||
std::atomic<bool> stop_threads{ false };
|
||||
};
|
||||
|
||||
std::optional<Connection> connection{ std::nullopt };
|
||||
|
||||
std::optional<std::thread> receive_thread{ std::nullopt };
|
||||
|
||||
void handle_ok(zmq::multipart_t const &message) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ namespace ydi::client {
|
|||
void connect(String const &url);
|
||||
void disconnect();
|
||||
NetworkData::ConnectionStatus status();
|
||||
namespace receive {
|
||||
Vector<NetworkData::ClueID> &conclusion();
|
||||
}
|
||||
namespace send {
|
||||
void reveal_clue(NetworkData::ClueID id);
|
||||
} //namespace send
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue