Websocket how? - page 3

 
Алексей Барбашин:

Yes, install visual studio community, it's free.

late, installed from microsoft
 
Алексей Барбашин:

visual studio isamikrosoft development.


What is the best type of project to choose from the templates?
 
Алексей Барбашин:

Maybe I'm wrong, but after a quick glance at the code I did not see the websocket implementation, tcp socket is implemented there.

I will express my position on it: implementation of something purely in mql language is of course great. It's nice when everything is implemented in one environment. No one development environment is able to cover all the needs. That's why different kinds of libraries, which expand the possibilities of the development environment, are created. But this is not even the main problem. In mql there is no multithreading and asynchrony, all the methods are executed strictly sequentially. Any reference to external sources, let it be http request or web request, inevitably leads to stopping the program until a response is received. Sometimes these interruptions can be significant, especially if there is an internet disruption. From my point of view any external interactions are better done in the form of third-party libraries (dll).

Websockets is an add-on to tcp sockets, the one I posted implemented a piece of a classic websocket client according tohttps://tools.ietf.org/html/rfc6455

 
Алексей Барбашин:

From my point of view, any external interactions are better done in the form of third-party libraries (dll).

This issue is purely a matter of personal religion and the requirements of the ToR.

I was more comfortable with the way it was done.

 
Дмитрий Прокопьев:

Have you tried it for the internet, how do you specify in the MT settings to use ws?

 
Алексей Барбашин:

Dimitri, I am not claiming that this is the only way to do it and I am not imposing it on anyone. I am expressing my position on this issue, nothing more. :)

:) Yeah, I understand. There's no question about it.

Believe me, I came to this implementation for a reason.

I had WCF in the form of a dll, which in principle worked. But the number of crutches produces exponentially more bugs,

and wasting time on a crooked infrastructure... is not the right thing to do. And so, all transparent and simple.

Events terminal <- json processing -> <- websocket clients -- websocket server -> <- json processing <- DataSience services

I wrote there above that I've now frozen this client, as a quality python lib to work with MT has appeared and another crutch can be thrown away.

 
Rorschach:

Have you tried it for internet, how do you specify in MT settings to use ws?

So it's an ip connection, I had it all within one host, what's stopping you from entering real addresses and going as you please.

Just keep in mind, I didn't do https. I didn't need to.

 
Rorschach:

Have you tried it for internet, how do you specify in MT settings to use ws?

Atacha picture. Port 80 is for handshake, 5000 for tcp sockets.

Allow dll - you don't need it.

Files:
Untitled.png  15 kb
 
Дмитрий Прокопьев:

So it's an ip connection, I had it all within one host, what's stopping you from entering real addresses and going as you please.

Just keep in mind, I didn't do https. I didn't need it.

I tried to make my own websocket based on MT sockets, but it went no further than a handshake, no response came back. I thought it was the MT "firewall".

If memory serves, I tested with this server http://demos.kaazing.com/echo/index.html
 
Rorschach:

I tried to make my own websocket based on MT sockets, but it didn't go further than a handshake, no response came. I thought it was the MT "firewall".

If memory serves, I tested with this server http://demos.kaazing.com/echo/index.html

If you are implementing the websockets protocol, you need to implement binary headers there.

Yes, you can test it here:http://www.websocket.org/demos/echo/

WebSocket JavaScript Echo Demo
WebSocket JavaScript Echo Demo
  • Kaazing
  • www.websocket.org
In the demo, enter the connection URL in the Location field and press Connect. If you don't have your own KAAZING Gateway running, you can connect to . You can also use which is hosted on http://websocket.org/echo.html. Secure connectivity Both sandbox.kaazing.net and echo.websocket.org are configured for secure connectivity, so you can also...