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
b8b4acef
Commit
b8b4acef
authored
Aug 06, 2009
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dispatcher renamed to context
parent
43fa72b7
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
77 additions
and
78 deletions
+77
-78
Makefile.am
src/Makefile.am
+2
-2
app_thread.cpp
src/app_thread.cpp
+4
-4
app_thread.hpp
src/app_thread.hpp
+2
-2
context.cpp
src/context.cpp
+14
-14
context.hpp
src/context.hpp
+12
-12
io_thread.cpp
src/io_thread.cpp
+4
-4
io_thread.hpp
src/io_thread.hpp
+1
-1
object.cpp
src/object.cpp
+13
-13
object.hpp
src/object.hpp
+3
-3
pipe.hpp
src/pipe.hpp
+4
-4
pipe_reader.cpp
src/pipe_reader.cpp
+1
-1
pipe_reader.hpp
src/pipe_reader.hpp
+3
-3
pipe_writer.hpp
src/pipe_writer.hpp
+3
-3
safe_object.cpp
src/safe_object.cpp
+3
-3
safe_object.hpp
src/safe_object.hpp
+1
-1
zmq.cpp
src/zmq.cpp
+7
-8
No files found.
src/Makefile.am
View file @
b8b4acef
...
...
@@ -8,10 +8,10 @@ libzmq_la_SOURCES = \
command.hpp
\
config.hpp
\
connecter.hpp
\
context.hpp
\
data_distributor.hpp
\
decoder.hpp
\
devpoll.hpp
\
dispatcher.hpp
\
dummy_aggregator.hpp
\
dummy_distributor.hpp
\
encoder.hpp
\
...
...
@@ -70,9 +70,9 @@ libzmq_la_SOURCES = \
zmq_tcp_engine.hpp
\
app_thread.cpp
\
connecter.cpp
\
context.cpp
\
data_distributor.cpp
\
devpoll.hpp
\
dispatcher.cpp
\
dummy_aggregator.cpp
\
dummy_distributor.cpp
\
epoll.cpp
\
...
...
src/app_thread.cpp
View file @
b8b4acef
...
...
@@ -26,7 +26,7 @@
#endif
#include "app_thread.hpp"
#include "
dispatcher
.hpp"
#include "
context
.hpp"
#include "err.hpp"
#include "session.hpp"
#include "pipe.hpp"
...
...
@@ -51,8 +51,8 @@
#define ZMQ_DELAY_COMMANDS
#endif
zmq
::
app_thread_t
::
app_thread_t
(
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
)
:
object_t
(
dispatcher
_
,
thread_slot_
),
zmq
::
app_thread_t
::
app_thread_t
(
context_t
*
context
_
,
int
thread_slot_
)
:
object_t
(
context
_
,
thread_slot_
),
tid
(
0
),
last_processing_time
(
0
)
{
...
...
@@ -213,7 +213,7 @@ void zmq::app_thread_t::process_commands (bool block_)
for
(
int
i
=
0
;
i
!=
thread_slot_count
();
i
++
)
{
if
(
signals
&
(
ypollset_t
::
signals_t
(
1
)
<<
i
))
{
command_t
cmd
;
while
(
dispatcher
->
read
(
i
,
get_thread_slot
(),
&
cmd
))
while
(
context
->
read
(
i
,
get_thread_slot
(),
&
cmd
))
cmd
.
destination
->
process_command
(
cmd
);
}
}
...
...
src/app_thread.hpp
View file @
b8b4acef
...
...
@@ -34,7 +34,7 @@ namespace zmq
{
public
:
app_thread_t
(
class
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
);
app_thread_t
(
class
context_t
*
context
_
,
int
thread_slot_
);
// To be called when the whole infrastrucure is being closed.
void
shutdown
();
...
...
@@ -47,7 +47,7 @@ namespace zmq
struct
i_api
*
create_socket
(
int
type_
);
// Nota bene: The following two functions are accessed from different
// threads. The caller (
dispatcher
) is responsible for synchronisation
// threads. The caller (
context
) is responsible for synchronisation
// of accesses.
// Returns true is current thread is associated with the app thread.
...
...
src/
dispatcher
.cpp
→
src/
context
.cpp
View file @
b8b4acef
...
...
@@ -19,7 +19,7 @@
#include "../include/zmq.h"
#include "
dispatcher
.hpp"
#include "
context
.hpp"
#include "app_thread.hpp"
#include "io_thread.hpp"
#include "platform.hpp"
...
...
@@ -34,7 +34,7 @@
#include "windows.h"
#endif
zmq
::
dispatcher_t
::
dispatcher
_t
(
int
app_threads_
,
int
io_threads_
)
zmq
::
context_t
::
context
_t
(
int
app_threads_
,
int
io_threads_
)
{
#ifdef ZMQ_HAVE_WINDOWS
// Intialise Windows sockets. Note that WSAStartup can be called multiple
...
...
@@ -72,12 +72,12 @@ zmq::dispatcher_t::dispatcher_t (int app_threads_, int io_threads_)
io_threads
[
i
]
->
start
();
}
void
zmq
::
dispatcher
_t
::
shutdown
()
void
zmq
::
context
_t
::
shutdown
()
{
delete
this
;
}
zmq
::
dispatcher_t
::~
dispatcher
_t
()
zmq
::
context_t
::~
context
_t
()
{
// Ask I/O threads to terminate.
for
(
io_threads_t
::
size_type
i
=
0
;
i
!=
io_threads
.
size
();
i
++
)
...
...
@@ -110,12 +110,12 @@ zmq::dispatcher_t::~dispatcher_t ()
#endif
}
int
zmq
::
dispatcher
_t
::
thread_slot_count
()
int
zmq
::
context
_t
::
thread_slot_count
()
{
return
signalers
.
size
();
}
zmq
::
i_api
*
zmq
::
dispatcher
_t
::
create_socket
(
int
type_
)
zmq
::
i_api
*
zmq
::
context
_t
::
create_socket
(
int
type_
)
{
threads_sync
.
lock
();
app_thread_t
*
thread
=
choose_app_thread
();
...
...
@@ -128,14 +128,14 @@ zmq::i_api *zmq::dispatcher_t::create_socket (int type_)
return
s
;
}
zmq
::
app_thread_t
*
zmq
::
dispatcher
_t
::
choose_app_thread
()
zmq
::
app_thread_t
*
zmq
::
context
_t
::
choose_app_thread
()
{
// Check whether thread ID is already assigned. If so, return it.
for
(
app_threads_t
::
size_type
i
=
0
;
i
!=
app_threads
.
size
();
i
++
)
if
(
app_threads
[
i
]
->
is_current
())
return
app_threads
[
i
];
// Check whether there's an unused thread slot in the
dispatcher
.
// Check whether there's an unused thread slot in the
cotext
.
for
(
app_threads_t
::
size_type
i
=
0
;
i
!=
app_threads
.
size
();
i
++
)
if
(
app_threads
[
i
]
->
make_current
())
return
app_threads
[
i
];
...
...
@@ -145,7 +145,7 @@ zmq::app_thread_t *zmq::dispatcher_t::choose_app_thread ()
return
NULL
;
}
zmq
::
io_thread_t
*
zmq
::
dispatcher
_t
::
choose_io_thread
(
uint64_t
taskset_
)
zmq
::
io_thread_t
*
zmq
::
context
_t
::
choose_io_thread
(
uint64_t
taskset_
)
{
zmq_assert
(
io_threads
.
size
()
>
0
);
...
...
@@ -165,7 +165,7 @@ zmq::io_thread_t *zmq::dispatcher_t::choose_io_thread (uint64_t taskset_)
return
io_threads
[
result
];
}
void
zmq
::
dispatcher
_t
::
create_pipe
(
object_t
*
reader_parent_
,
void
zmq
::
context
_t
::
create_pipe
(
object_t
*
reader_parent_
,
object_t
*
writer_parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
,
pipe_reader_t
**
reader_
,
pipe_writer_t
**
writer_
)
{
...
...
@@ -191,7 +191,7 @@ void zmq::dispatcher_t::create_pipe (object_t *reader_parent_,
*
writer_
=
writer
;
}
void
zmq
::
dispatcher
_t
::
destroy_pipe
(
pipe_t
*
pipe_
)
void
zmq
::
context
_t
::
destroy_pipe
(
pipe_t
*
pipe_
)
{
// Remove the pipe from the repository.
pipe_info_t
info
;
...
...
@@ -209,7 +209,7 @@ void zmq::dispatcher_t::destroy_pipe (pipe_t *pipe_)
delete
info
.
writer
;
}
int
zmq
::
dispatcher
_t
::
register_inproc_endpoint
(
const
char
*
endpoint_
,
int
zmq
::
context
_t
::
register_inproc_endpoint
(
const
char
*
endpoint_
,
session_t
*
session_
)
{
inproc_endpoint_sync
.
lock
();
...
...
@@ -227,7 +227,7 @@ int zmq::dispatcher_t::register_inproc_endpoint (const char *endpoint_,
return
0
;
}
zmq
::
object_t
*
zmq
::
dispatcher
_t
::
get_inproc_endpoint
(
const
char
*
endpoint_
)
zmq
::
object_t
*
zmq
::
context
_t
::
get_inproc_endpoint
(
const
char
*
endpoint_
)
{
inproc_endpoint_sync
.
lock
();
inproc_endpoints_t
::
iterator
it
=
inproc_endpoints
.
find
(
endpoint_
);
...
...
@@ -245,7 +245,7 @@ zmq::object_t *zmq::dispatcher_t::get_inproc_endpoint (const char *endpoint_)
return
session
;
}
void
zmq
::
dispatcher
_t
::
unregister_inproc_endpoints
(
session_t
*
session_
)
void
zmq
::
context
_t
::
unregister_inproc_endpoints
(
session_t
*
session_
)
{
inproc_endpoint_sync
.
lock
();
...
...
src/
dispatcher
.hpp
→
src/
context
.hpp
View file @
b8b4acef
...
...
@@ -17,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ZMQ_
DISPATCHER
_HPP_INCLUDED__
#define __ZMQ_
DISPATCHER
_HPP_INCLUDED__
#ifndef __ZMQ_
CONTEXT
_HPP_INCLUDED__
#define __ZMQ_
CONTEXT
_HPP_INCLUDED__
#include <vector>
#include <map>
...
...
@@ -37,19 +37,19 @@ namespace zmq
// Dispatcher implements bidirectional thread-safe passing of commands
// between N threads. It consists of a ypipes to pass commands and
// signalers to wake up the receiver thread when new commands are
// available. Note that
dispatcher
is inefficient for passing messages
// available. Note that
context
is inefficient for passing messages
// within a thread (sender thread = receiver thread). The optimisation is
// not part of the class and should be implemented by individual threads
// (presumably by calling the command handling function directly).
class
dispatcher
_t
class
context
_t
{
public
:
// Create the
dispatcher
object. Matrix of pipes to communicate between
// Create the
context
object. Matrix of pipes to communicate between
// each socket and each I/O thread is created along with appropriate
// signalers.
dispatcher
_t
(
int
app_threads_
,
int
io_threads_
);
context
_t
(
int
app_threads_
,
int
io_threads_
);
// To be called to terminate the whole infrastructure (zmq_term).
void
shutdown
();
...
...
@@ -57,12 +57,12 @@ namespace zmq
// Create a socket engine.
struct
i_api
*
create_socket
(
int
type_
);
// Returns number of thread slots in the
dispatcher
. To be used by
// Returns number of thread slots in the
context
. To be used by
// individual threads to find out how many distinct signals can be
// received.
int
thread_slot_count
();
//
Write command to the dispatcher
.
//
Send command from the source to the destination
.
inline
void
write
(
int
source_
,
int
destination_
,
const
command_t
&
command_
)
{
...
...
@@ -73,7 +73,7 @@ namespace zmq
signalers
[
destination_
]
->
signal
(
source_
);
}
// Re
ad command from the dispatcher
. Returns false if there is no
// Re
ceive command from the source
. Returns false if there is no
// command available.
inline
bool
read
(
int
source_
,
int
destination_
,
command_t
*
command_
)
{
...
...
@@ -110,7 +110,7 @@ namespace zmq
private
:
// Clean-up.
~
dispatcher
_t
();
~
context
_t
();
// Returns the app thread associated with the current thread.
// NULL if we are out of app thread slots.
...
...
@@ -160,8 +160,8 @@ namespace zmq
// of inproc endpoints.
mutex_t
inproc_endpoint_sync
;
dispatcher_t
(
const
dispatcher
_t
&
);
void
operator
=
(
const
dispatcher
_t
&
);
context_t
(
const
context
_t
&
);
void
operator
=
(
const
context
_t
&
);
};
}
...
...
src/io_thread.cpp
View file @
b8b4acef
...
...
@@ -29,13 +29,13 @@
#include "select.hpp"
#include "devpoll.hpp"
#include "kqueue.hpp"
#include "
dispatcher
.hpp"
#include "
context
.hpp"
#include "session.hpp"
#include "simple_semaphore.hpp"
#include "session.hpp"
zmq
::
io_thread_t
::
io_thread_t
(
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
)
:
object_t
(
dispatcher
_
,
thread_slot_
)
zmq
::
io_thread_t
::
io_thread_t
(
context_t
*
context
_
,
int
thread_slot_
)
:
object_t
(
context
_
,
thread_slot_
)
{
#if defined ZMQ_FORCE_SELECT
poller
=
new
select_t
;
...
...
@@ -131,7 +131,7 @@ void zmq::io_thread_t::in_event ()
// Read all the commands from particular thread.
command_t
cmd
;
while
(
dispatcher
->
read
(
source_thread_slot
,
thread_slot
,
&
cmd
))
while
(
context
->
read
(
source_thread_slot
,
thread_slot
,
&
cmd
))
cmd
.
destination
->
process_command
(
cmd
);
}
}
...
...
src/io_thread.hpp
View file @
b8b4acef
...
...
@@ -38,7 +38,7 @@ namespace zmq
{
public
:
io_thread_t
(
class
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
);
io_thread_t
(
class
context_t
*
context
_
,
int
thread_slot_
);
// Launch the physical thread.
void
start
();
...
...
src/object.cpp
View file @
b8b4acef
...
...
@@ -18,7 +18,7 @@
*/
#include "object.hpp"
#include "
dispatcher
.hpp"
#include "
context
.hpp"
#include "err.hpp"
#include "pipe_reader.hpp"
#include "pipe_writer.hpp"
...
...
@@ -27,14 +27,14 @@
#include "simple_semaphore.hpp"
#include "i_engine.hpp"
zmq
::
object_t
::
object_t
(
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
)
:
dispatcher
(
dispatcher
_
),
zmq
::
object_t
::
object_t
(
context_t
*
context
_
,
int
thread_slot_
)
:
context
(
context
_
),
thread_slot
(
thread_slot_
)
{
}
zmq
::
object_t
::
object_t
(
object_t
*
parent_
)
:
dispatcher
(
parent_
->
dispatcher
),
context
(
parent_
->
context
),
thread_slot
(
parent_
->
thread_slot
)
{
}
...
...
@@ -45,7 +45,7 @@ zmq::object_t::~object_t ()
int
zmq
::
object_t
::
thread_slot_count
()
{
return
dispatcher
->
thread_slot_count
();
return
context
->
thread_slot_count
();
}
int
zmq
::
object_t
::
get_thread_slot
()
...
...
@@ -107,34 +107,34 @@ void zmq::object_t::create_pipe (object_t *reader_parent_,
object_t
*
writer_parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
,
pipe_reader_t
**
reader_
,
pipe_writer_t
**
writer_
)
{
dispatcher
->
create_pipe
(
reader_parent_
,
writer_parent_
,
hwm_
,
lwm_
,
context
->
create_pipe
(
reader_parent_
,
writer_parent_
,
hwm_
,
lwm_
,
reader_
,
writer_
);
}
void
zmq
::
object_t
::
destroy_pipe
(
pipe_t
*
pipe_
)
{
dispatcher
->
destroy_pipe
(
pipe_
);
context
->
destroy_pipe
(
pipe_
);
}
int
zmq
::
object_t
::
register_inproc_endpoint
(
const
char
*
endpoint_
,
session_t
*
session_
)
{
return
dispatcher
->
register_inproc_endpoint
(
endpoint_
,
session_
);
return
context
->
register_inproc_endpoint
(
endpoint_
,
session_
);
}
zmq
::
object_t
*
zmq
::
object_t
::
get_inproc_endpoint
(
const
char
*
endpoint_
)
{
return
dispatcher
->
get_inproc_endpoint
(
endpoint_
);
return
context
->
get_inproc_endpoint
(
endpoint_
);
}
void
zmq
::
object_t
::
unregister_inproc_endpoints
(
session_t
*
session_
)
{
dispatcher
->
unregister_inproc_endpoints
(
session_
);
context
->
unregister_inproc_endpoints
(
session_
);
}
zmq
::
io_thread_t
*
zmq
::
object_t
::
choose_io_thread
(
uint64_t
taskset_
)
{
return
dispatcher
->
choose_io_thread
(
taskset_
);
return
context
->
choose_io_thread
(
taskset_
);
}
void
zmq
::
object_t
::
send_stop
()
...
...
@@ -144,7 +144,7 @@ void zmq::object_t::send_stop ()
command_t
cmd
;
cmd
.
destination
=
this
;
cmd
.
type
=
command_t
::
stop
;
dispatcher
->
write
(
thread_slot
,
thread_slot
,
cmd
);
context
->
write
(
thread_slot
,
thread_slot
,
cmd
);
}
void
zmq
::
object_t
::
send_bind
(
object_t
*
destination_
,
pipe_reader_t
*
reader_
,
...
...
@@ -289,6 +289,6 @@ void zmq::object_t::send_command (command_t &cmd_)
if
(
destination_thread_slot
==
thread_slot
)
cmd_
.
destination
->
process_command
(
cmd_
);
else
dispatcher
->
write
(
thread_slot
,
destination_thread_slot
,
cmd_
);
context
->
write
(
thread_slot
,
destination_thread_slot
,
cmd_
);
}
src/object.hpp
View file @
b8b4acef
...
...
@@ -32,7 +32,7 @@ namespace zmq
{
public
:
object_t
(
class
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
);
object_t
(
class
context_t
*
context
_
,
int
thread_slot_
);
object_t
(
object_t
*
parent_
);
~
object_t
();
...
...
@@ -42,7 +42,7 @@ namespace zmq
protected
:
// Derived object can use following functions to interact with
// global repositories. See
dispatcher
.hpp for function details.
// global repositories. See
context
.hpp for function details.
int
thread_slot_count
();
void
create_pipe
(
class
object_t
*
reader_parent_
,
class
object_t
*
writer_parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
,
...
...
@@ -87,7 +87,7 @@ namespace zmq
virtual
void
process_terminate_ack
();
// Pointer to the root of the infrastructure.
class
dispatcher_t
*
dispatcher
;
class
context_t
*
context
;
// Slot ID of the thread the object belongs to.
int
thread_slot
;
...
...
src/pipe.hpp
View file @
b8b4acef
...
...
@@ -32,10 +32,10 @@ namespace zmq
class
pipe_t
:
public
ypipe_t
<
zmq_msg
,
false
,
message_pipe_granularity
>
{
//
Dispatcher
is a friend so that it can create & destroy the pipes.
//
Context
is a friend so that it can create & destroy the pipes.
// By making constructor & destructor private we are sure that nobody
// except
dispatcher
messes with pipes.
friend
class
dispatcher
_t
;
// except
context
messes with pipes.
friend
class
context
_t
;
private
:
...
...
@@ -45,7 +45,7 @@ namespace zmq
void
set_index
(
int
index_
);
int
get_index
();
// Index of the pipe in
dispatcher
's array of pipes.
// Index of the pipe in
context
's array of pipes.
int
index
;
pipe_t
(
const
pipe_t
&
);
...
...
src/pipe_reader.cpp
View file @
b8b4acef
...
...
@@ -113,6 +113,6 @@ void zmq::pipe_reader_t::terminate ()
void
zmq
::
pipe_reader_t
::
process_terminate_ack
()
{
// Ask
dispatcher
to deallocate the pipe.
// Ask
context
to deallocate the pipe.
destroy_pipe
(
pipe
);
}
src/pipe_reader.hpp
View file @
b8b4acef
...
...
@@ -28,10 +28,10 @@ namespace zmq
class
pipe_reader_t
:
public
object_t
{
//
Dispatcher
is a friend so that it can create & destroy the reader.
//
Context
is a friend so that it can create & destroy the reader.
// By making constructor & destructor private we are sure that nobody
// except
dispatcher
messes with readers.
friend
class
dispatcher
_t
;
// except
context
messes with readers.
friend
class
context
_t
;
public
:
...
...
src/pipe_writer.hpp
View file @
b8b4acef
...
...
@@ -28,10 +28,10 @@ namespace zmq
class
pipe_writer_t
:
public
object_t
{
//
Dispatcher
is a friend so that it can create & destroy the writer.
//
Context
is a friend so that it can create & destroy the writer.
// By making constructor & destructor private we are sure that nobody
// except
dispatcher
messes with writers.
friend
class
dispatcher
_t
;
// except
context
messes with writers.
friend
class
context
_t
;
public
:
...
...
src/safe_object.cpp
View file @
b8b4acef
...
...
@@ -19,9 +19,9 @@
#include "safe_object.hpp"
zmq
::
safe_object_t
::
safe_object_t
(
class
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
)
:
object_t
(
dispatcher
_
,
thread_slot_
),
zmq
::
safe_object_t
::
safe_object_t
(
class
context_t
*
context
_
,
int
thread_slot_
)
:
object_t
(
context
_
,
thread_slot_
),
processed_seqnum
(
0
),
terminating
(
false
)
{
...
...
src/safe_object.hpp
View file @
b8b4acef
...
...
@@ -36,7 +36,7 @@ namespace zmq
{
public
:
safe_object_t
(
class
dispatcher_t
*
dispatcher
_
,
int
thread_slot_
);
safe_object_t
(
class
context_t
*
context
_
,
int
thread_slot_
);
safe_object_t
(
object_t
*
parent_
);
void
inc_seqnum
();
...
...
src/zmq.cpp
View file @
b8b4acef
...
...
@@ -25,7 +25,7 @@
#include "i_api.hpp"
#include "err.hpp"
#include "
dispatcher
.hpp"
#include "
context
.hpp"
#include "msg.hpp"
int
zmq_msg_init
(
zmq_msg
*
msg_
)
...
...
@@ -162,28 +162,27 @@ int zmq_msg_type (zmq_msg *msg_)
void
*
zmq_init
(
int
app_threads_
,
int
io_threads_
)
{
// There should be at least a single thread managed by the
dispatcher
.
// There should be at least a single thread managed by the
context
.
if
(
app_threads_
<
0
||
io_threads_
<
0
||
app_threads_
+
io_threads_
==
0
)
{
errno
=
EINVAL
;
return
NULL
;
}
zmq
::
dispatcher_t
*
dispatcher
=
new
zmq
::
dispatcher_t
(
app_threads_
,
io_threads_
);
zmq_assert
(
dispatcher
);
return
(
void
*
)
dispatcher
;
zmq
::
context_t
*
context
=
new
zmq
::
context_t
(
app_threads_
,
io_threads_
);
zmq_assert
(
context
);
return
(
void
*
)
context
;
}
int
zmq_term
(
void
*
context_
)
{
((
zmq
::
dispatcher
_t
*
)
context_
)
->
shutdown
();
((
zmq
::
context
_t
*
)
context_
)
->
shutdown
();
return
0
;
}
void
*
zmq_socket
(
void
*
context_
,
int
type_
)
{
return
(
void
*
)
(((
zmq
::
dispatcher
_t
*
)
context_
)
->
create_socket
(
type_
));
return
(
void
*
)
(((
zmq
::
context
_t
*
)
context_
)
->
create_socket
(
type_
));
}
int
zmq_close
(
void
*
s_
)
...
...
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