From ad415995ee88c9439b02ea6e9bb8b2f8bbc0710a Mon Sep 17 00:00:00 2001 From: Ron Elliott Date: Sat, 28 Jul 2012 10:22:10 -0700 Subject: [PATCH] Added 'connected' method to socket_t class. --- zmq.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zmq.hpp b/zmq.hpp index 041abb2..4dec475 100644 --- a/zmq.hpp +++ b/zmq.hpp @@ -317,6 +317,11 @@ namespace zmq throw error_t (); } + inline bool connected() + { + return(ptr != NULL); + } + inline size_t send (const void *buf_, size_t len_, int flags_ = 0) { int nbytes = zmq_send (ptr, buf_, len_, flags_);