diff options
Diffstat (limited to 'simpleperf/UnixSocket.h')
-rw-r--r-- | simpleperf/UnixSocket.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/simpleperf/UnixSocket.h b/simpleperf/UnixSocket.h index 87a045bb..fd2796a0 100644 --- a/simpleperf/UnixSocket.h +++ b/simpleperf/UnixSocket.h @@ -150,6 +150,10 @@ class UnixSocketConnection { ~UnixSocketConnection(); + bool IsClosed() { + return fd_ == -1; + } + bool PrepareForIO(IOEventLoop& loop, const std::function<bool(const UnixSocketMessage&)>& receive_message_callback, |