remove zeromq completely

This commit is contained in:
fuwa 2019-11-06 14:25:36 +08:00 committed by wowario
parent 338771fe21
commit f764cf0626
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111
5 changed files with 10 additions and 17 deletions

View file

@ -970,6 +970,9 @@ find_library(NORM_LIBRARY norm)
find_library(PROTOLIB_LIBRARY protolib)
find_library(SODIUM_LIBRARY sodium)
set(ZMQ_INCLUDE_PATH zmq_dummy_include_path)
set(ZMQ_LIB zmq_dummy_lib_2)
if(NOT ZMQ_INCLUDE_PATH)
message(FATAL_ERROR "Could not find required header zmq.h")
endif()

View file

@ -88,7 +88,6 @@ target_link_libraries(daemon
${Boost_REGEX_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${ZMQ_LIB}
${GNU_READLINE_LIBRARY}
${EXTRA_LIBRARIES}
${Blocks})

View file

@ -34,7 +34,6 @@
#include "misc_log_ex.h"
#include "daemon/daemon.h"
#include "rpc/daemon_handler.h"
#include "rpc/zmq_server.h"
#include "common/password.h"
#include "common/util.h"
@ -171,11 +170,10 @@ bool t_daemon::run(bool interactive)
}
cryptonote::rpc::DaemonHandler rpc_daemon_handler(mp_internals->core.get(), mp_internals->p2p.get());
cryptonote::rpc::ZmqServer zmq_server(rpc_daemon_handler);
if (!zmq_rpc_disabled)
if (false)
{
if (!zmq_server.addTCPSocket(zmq_rpc_bind_address, zmq_rpc_bind_port))
if (false)
{
LOG_ERROR(std::string("Failed to add TCP Socket (") + zmq_rpc_bind_address
+ ":" + zmq_rpc_bind_port + ") to ZMQ RPC Server");
@ -190,7 +188,6 @@ bool t_daemon::run(bool interactive)
}
MINFO("Starting ZMQ server...");
zmq_server.run();
MINFO(std::string("ZMQ server started at ") + zmq_rpc_bind_address
+ ":" + zmq_rpc_bind_port + ".");
@ -209,9 +206,6 @@ bool t_daemon::run(bool interactive)
if (rpc_commands)
rpc_commands->stop_handling();
if (!zmq_rpc_disabled)
zmq_server.stop();
for(auto& rpc : mp_internals->rpcs)
rpc->stop();
MGINFO("Node stopped.");

View file

@ -27,10 +27,10 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set(net_sources dandelionpp.cpp error.cpp i2p_address.cpp parse.cpp socks.cpp
socks_connect.cpp tor_address.cpp zmq.cpp)
socks_connect.cpp tor_address.cpp)
set(net_headers dandelionpp.h error.h i2p_address.h parse.h socks.h socks_connect.h
tor_address.h zmq.h)
tor_address.h)
monero_add_library(net ${net_sources} ${net_headers})
target_link_libraries(net common epee ${ZMQ_LIB} ${Boost_ASIO_LIBRARY})
target_link_libraries(net common epee ${Boost_ASIO_LIBRARY})

View file

@ -46,8 +46,7 @@ set(daemon_messages_sources
daemon_messages.cpp)
set(daemon_rpc_server_sources
daemon_handler.cpp
zmq_server.cpp)
daemon_handler.cpp)
set(rpc_base_headers
@ -76,8 +75,7 @@ set(daemon_messages_private_headers
set(daemon_rpc_server_private_headers
message.h
daemon_messages.h
daemon_handler.h
zmq_server.h)
daemon_handler.h)
monero_private_headers(rpc
@ -151,7 +149,6 @@ target_link_libraries(daemon_rpc_server
${Boost_REGEX_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${ZMQ_LIB}
${EXTRA_LIBRARIES})
target_include_directories(daemon_rpc_server PUBLIC ${ZMQ_INCLUDE_PATH})
target_include_directories(obj_daemon_rpc_server PUBLIC ${ZMQ_INCLUDE_PATH})