Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gloo/transport/uv/pair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const Address& Pair::address() const {
return addr_;
}

bool Pair::isConnected() {
std::lock_guard<std::mutex> lock(mutex_);
return state_ == CONNECTED;
}

void Pair::connect(const std::vector<char>& bytes) {
const auto peer = Address(bytes);

Expand Down
2 changes: 2 additions & 0 deletions gloo/transport/uv/pair.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ class Pair : public ::gloo::transport::Pair {

void close() override;

bool isConnected() override;

private:
std::mutex mutex_;
std::condition_variable cv_;
Expand Down