Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
976b347d
Commit
976b347d
authored
Dec 13, 2021
by
legoc
Browse files
Removed cancelCreatePublisher() from ContextZmq
parent
005ecca8
Changes
4
Hide whitespace changes
Inline
Side-by-side
cameo-api-cpp/src/base/impl/zmq/ContextZmq.cpp
View file @
976b347d
...
...
@@ -90,12 +90,4 @@ zmq::socket_t * ContextZmq::createOutputStreamSubscriber(const std::string& endp
return
subscriber
;
}
zmq
::
socket_t
*
ContextZmq
::
createCancelPublisher
(
const
std
::
string
&
endpoint
)
{
zmq
::
socket_t
*
publisher
=
new
zmq
::
socket_t
(
*
m_context
.
get
(),
ZMQ_PUB
);
publisher
->
bind
(
endpoint
.
c_str
());
return
publisher
;
}
}
cameo-api-cpp/src/base/impl/zmq/ContextZmq.h
View file @
976b347d
...
...
@@ -44,7 +44,6 @@ public:
zmq
::
socket_t
*
createEventSubscriber
(
const
std
::
string
&
endpoint
,
const
std
::
string
&
cancelEndpoint
);
zmq
::
socket_t
*
createOutputStreamSubscriber
(
const
std
::
string
&
endpoint
,
const
std
::
string
&
cancelEndpoint
);
zmq
::
socket_t
*
createCancelPublisher
(
const
std
::
string
&
endpoint
);
private:
std
::
unique_ptr
<
zmq
::
context_t
>
m_context
;
...
...
cameo-api-cpp/src/base/impl/zmq/EventStreamSocketZmq.cpp
View file @
976b347d
...
...
@@ -41,7 +41,10 @@ void EventStreamSocketZmq::init() {
cancelEndpoint
<<
"inproc://cancel."
<<
CancelIdGenerator
::
newId
();
// Create the sockets.
m_cancelSocket
.
reset
(
m_context
->
createCancelPublisher
(
cancelEndpoint
.
str
()));
m_cancelSocket
=
std
::
unique_ptr
<
zmq
::
socket_t
>
(
new
zmq
::
socket_t
(
m_context
->
getContext
(),
ZMQ_PUB
));
m_cancelSocket
->
bind
(
cancelEndpoint
.
str
());
m_socket
.
reset
(
m_context
->
createEventSubscriber
(
m_server
->
getStatusEndpoint
().
toString
(),
cancelEndpoint
.
str
()));
// Wait for the connection to be ready.
...
...
cameo-api-cpp/src/base/impl/zmq/OutputStreamSocketZmq.cpp
View file @
976b347d
...
...
@@ -48,7 +48,9 @@ void OutputStreamSocketZmq::init() {
cancelEndpoint
<<
"inproc://cancel."
<<
CancelIdGenerator
::
newId
();
// Create the sockets.
m_cancelSocket
.
reset
(
m_context
->
createCancelPublisher
(
cancelEndpoint
.
str
()));
m_cancelSocket
=
std
::
unique_ptr
<
zmq
::
socket_t
>
(
new
zmq
::
socket_t
(
m_context
->
getContext
(),
ZMQ_PUB
));
m_cancelSocket
->
bind
(
cancelEndpoint
.
str
());
m_socket
.
reset
(
m_context
->
createOutputStreamSubscriber
(
m_server
->
getEndpoint
().
withPort
(
port
).
toString
(),
cancelEndpoint
.
str
()));
// Wait for the connection to be ready.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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