mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-13 10:52:57 +01:00
Merge pull request #62 from gdfast/patch-2
Make getsockopt() functions const
This commit is contained in:
commit
2e22e3fc45
4
zmq.hpp
4
zmq.hpp
@ -497,14 +497,14 @@ namespace zmq
|
||||
}
|
||||
|
||||
inline void getsockopt (int option_, void *optval_,
|
||||
size_t *optvallen_)
|
||||
size_t *optvallen_) const
|
||||
{
|
||||
int rc = zmq_getsockopt (ptr, option_, optval_, optvallen_);
|
||||
if (rc != 0)
|
||||
throw error_t ();
|
||||
}
|
||||
|
||||
template<typename T> T getsockopt(int option_)
|
||||
template<typename T> T getsockopt(int option_) const
|
||||
{
|
||||
T optval;
|
||||
size_t optlen = sizeof(T);
|
||||
|
Loading…
Reference in New Issue
Block a user