dingmaotu / mql-zmq

ZMQ binding for the MQL language (both 32bit MT4 and 64bit MT5)
Apache License 2.0
543 stars 298 forks source link

Cannot unbind PUB and REQ socket #30

Closed aleksandermajos closed 5 years ago

aleksandermajos commented 5 years ago

Hi, Win10 64 bit. In my project I try to connect multiple MT4/5 terminals. My python part listen 2027(PUBSUB) and 2028(REQREP).After discover new MT4/5 give it new ports. For instance the next possible numbers: 2029(PUBSUB) and 2030(REQREP). However, I cannot unbind 2027 and 2028, and when I lunch next MT4/5 terminal it is a conflict. Two sockets from different terminals speaking on 2027 and 2028. How Can I unbind?I try: name_of_the_socket.unbind(adress:port). Try also destroy the context,try also create second pair of ports but still is a conflict. How can I unbind or destroy the ports on MT4/5 side??

dingmaotu commented 5 years ago

Normally, if you close your terminal, all related ports are closed. Your description is a little vague. Your Python part is listening on 2027/2028, and why do you want to unbind these ports from MT4/5?

dingmaotu commented 5 years ago

Since there is no further discussion, I will close this issue. Please reopen it if you still have problems with the code.