Problemas con zmq_bind () en el enlace ZeroMQ para el lenguaje MQL4
Estoy trabajando en MT4 y envoltorio usadomql4zmq.dll
como se da en el enlace
https://github.com/AustenConrad/mql4zmq
Como he seguido todas las instrucciones y cargado con éxitoDLL
tanto comolib
archivo en ubicaciones específicas de precompilado. Pero no puedobind
oconnect
con zócalo a travészmq_connect(,)
ozmq_bind(,)
. Por favor, que alguien me ayude a resolver este problema. Estoy publicando mi código aquí
// Include the libzmq.dll abstraction wrapper.
#include <mql4zmq.mqh>
//+------------------------------------------------------------------+
//| variable definitions |
//+------------------------------------------------------------------+
int speaker,listener,contextt;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
int major[1];int minor[1];int patch[1];
zmq_version(major,minor,patch);
Print("Using zeromq version " + major[0] + "." + minor[0] + "." + patch[0]);
Print(ping("Hello World"));
Print("NOTE: to use the precompiled libraries you will need to have the Microsoft Visual C++ 2010 Redistributable Package installed. To Download: http://www.microsoft.com/download/en/details.aspx?id=5555");
contextt = zmq_init(1);
speaker = zmq_socket(contextt, ZMQ_PUB);
listener = zmq_socket(contextt, ZMQ_SUB);
// Subscribe to the command channel (i.e. "cmd").
// NOTE: to subscribe to multiple channels call zmq_setsockopt multiple times.
zmq_setsockopt(listener, ZMQ_SUBSCRIBE, "");
if (zmq_bind(speaker,"tcp://127.0.0.1:5555") == -1)
{
Print("Error binding the speaker!");
return(-1);
}
Hay un problema en
if ( zmq_bind( speaker, "tcp://127.0.0.1:5555" ) == -1 )
Vuelve-1
y nobind
.
He intentado todo lo posible para resolver este misterio pero fallé.
¡Por favor, avíseme si me equivoco!