Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
d0c8edde
Commit
d0c8edde
authored
Mar 12, 2011
by
Guido Goldstein
Committed by
Martin Sustrik
Mar 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing close method w/ check if socket is already closed.
Signed-off-by:
Guido Goldstein
<
github@a-nugget.de
>
parent
7b95c592
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
zmq.hpp
include/zmq.hpp
+12
-2
No files found.
include/zmq.hpp
View file @
d0c8edde
...
...
@@ -214,8 +214,7 @@ namespace zmq
inline
~
socket_t
()
{
int
rc
=
zmq_close
(
ptr
);
assert
(
rc
==
0
);
close
();
}
inline
operator
void
*
()
...
...
@@ -223,6 +222,17 @@ namespace zmq
return
ptr
;
}
inline
void
close
()
{
if
(
ptr
==
NULL
)
// already closed
return
;
int
rc
=
zmq_close
(
ptr
);
if
(
rc
!=
0
)
throw
error_t
();
ptr
=
0
;
}
inline
void
setsockopt
(
int
option_
,
const
void
*
optval_
,
size_t
optvallen_
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment