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

Can you modify the implementation? #35

Closed huangshangbin closed 5 years ago

huangshangbin commented 5 years ago

thank you provide this lib。

for sub/pub model, subscriber received msg include the code。 server code: if((i % 2) == 0) { ZmqMsg workMsg("A workA" + i); socket.send(workMsg); } if((i % 2) == 1) { ZmqMsg workMsg("B workB" + i); socket.send(workMsg); } subscriber A received msg is A workA0 ... subscriber B received msg is B workB1 ...

i hope subscriber A received msg is workA0 ... subscriber B received msg is workB1 ...

i more hope server code like this: if((i % 2) == 0) { socket.subscribe("A"); ZmqMsg workMsg("workA" + i); socket.send(workMsg); } if((i % 3) == 1) { socket.subscribe("B"); ZmqMsg workMsg("workB" + i); socket.send(workMsg); }

can you modify it?

dingmaotu commented 5 years ago

I'm afraid I can't. This is how ZMQ works and changing this will break other's code.

huangshangbin commented 5 years ago

ok, i study zmq no enough. ==