BTW: Please don't edit any post
Don't worry; I'm not going to go back and edit anything. (Google has now re-crawled the site, BTW. As expected, this topic is now the #1 hit for a search on "mql4 socket bind listen" etc, and should hopefully help people like you to find it in future.)
Good luck with the code.
I didn't answer your post days ago because I didn't see it (please excuse me):
don't understand the point of using Sleep() in a timer event as it puts
the EA on hold and this could mean missing a lot of OnTick() events. Of
course, depending on the EA, OnTick events may be unimportant.
In my case I'm not worried about missing those OnTick(), but that's correct.
I posted a separate socket library at https://www.mql5.com/en/forum/203049#comment_5232176
I then tried submitting a combination of the code in these two threads to the codebase, but MQ Support couldn't handle the fact that it worked on both MQL4 and MQL5, whereas the codebase requires separate sections for MQL4 and MQL5. It's been sitting in codebase since June waiting for proofreading by MQ. I might give up and just post it as a forum topic...
Why not just place it in your Profile blog?
There are several other authors that do that due to the hassle of getting things published in the CodeBase or as Articles.
Then you just have to reference it in the forum when needed!
The search does work on blogs and I have on several occasions found very useful blog posts presented by the search facility.
EDIT: Here is an example - search for "trading hypercubes" both on Google and on this site's search.
Can't be bothered to wait for the support desk to respond twice. Published as a blog entry following Fernando's suggestion: https://www.mql5.com/en/blogs/post/706665