A non-owning nullable reference to a socket. The reference is invalidated on socket close or destruction.
| 2113 | // A non-owning nullable reference to a socket. |
| 2114 | // The reference is invalidated on socket close or destruction. |
| 2115 | class socket_ref : public detail::socket_base |
| 2116 | { |
| 2117 | public: |
| 2118 | socket_ref() ZMQ_NOTHROW : detail::socket_base() {} |
| 2119 | #ifdef ZMQ_CPP11 |
| 2120 | socket_ref(std::nullptr_t) ZMQ_NOTHROW : detail::socket_base() {} |
| 2121 | #endif |
| 2122 | socket_ref(from_handle_t /*fh*/, void *handle) ZMQ_NOTHROW |
| 2123 | : detail::socket_base(handle) |
| 2124 | { |
| 2125 | } |
| 2126 | }; |
| 2127 | |
| 2128 | #ifdef ZMQ_CPP11 |
| 2129 | inline bool operator==(socket_ref sr, std::nullptr_t /*p*/) ZMQ_NOTHROW |