Interaction between MQL5 (or C++) and C# via Named Pipes -
good day,
i trying send data via named pipes. created named pipe server in c# , client in mql5 (it c++ wrapper). server works fine , can reached named pipe client written in c# communication c# <-> c# works fine. tried utility pipelist , shows pipe server visible , available.
the problem client written in mql5 (c++) - not find path pipe server communication mql <-> c# failing.
could suggest :
- what doing wrong?
- how check both c# , mql accessing same physical path , same location?
server :
namedpipeserverstream pipestream = new namedpipeserverstream("mql5", pipedirection.in, 1, pipetransmissionmode.byte)
i tried full path \\\\.\\pipe\\mql5 no success
client :
cfilepipe ipipe; while(isstopped() == false) { print("this loop infinite because there no connection"); if (ipipe.open("\\\\.\\pipe\\mql5", file_read | file_write | file_bin) != invalid_handle) break; sleep(250); }
thanks, art
answer found. seems own mistake or how pipes work in mql - channel needs duplex line in c# needs replaced following :
namedpipeserverstream pipestream = new namedpipeserverstream(name, pipedirection.inout, 1, pipetransmissionmode.byte)
parameter pipedirection.inout says pipe two-way.
p.s. though little weird anyway because conjunction c# server <-> c# client can work in both modes (in / out or 1 of them)
Comments
Post a Comment