Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Dec 9, 2024
1 parent 1403041 commit 2ae808d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@

### How to Build and Run

**CMake Presets**

```bash
$> cmake --preset dev
# OR
$> cmake --preset release
$> cmake --build build -t run_with_tb
```

**Another C++ toolchain**

```bash
Expand Down
7 changes: 4 additions & 3 deletions include/tb_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ inline void default_on_completion([[maybe_unused]] uintptr_t context,

class Client {
public:
explicit Client(const std::string &address, uint32_t cluster_id = 0,
explicit Client(const std::string &address,
std::array<uint8_t, 16> cluster_id = {},
uintptr_t on_completion_ctx = 0,
void (*on_completion_fn)(uintptr_t, tb_client_t,
tb_packet_t *, uint64_t,
const uint8_t *,
uint32_t) = &default_on_completion)
: client(nullptr) {
status =
tb_client_init(&client, cluster_id, address.c_str(), address.length(),
on_completion_ctx, on_completion_fn);
tb_client_init(&client, cluster_id.data(), address.c_str(),
address.length(), on_completion_ctx, on_completion_fn);
}

Client(const Client &) = delete;
Expand Down

0 comments on commit 2ae808d

Please sign in to comment.