Websocket how? - page 18

 
Maxim Kuznetsov:

Since I work with web sockets a lot, I looked at their docs, thankfully I know how to read documentation

Maxim, can you tell me how to make a request?

 
Fedor Arkhipov:

Maxim, can you tell me how to make a request?

maybe that's where you should have started?

https://www.mql5.com/ru/docs/network/webrequest

Документация по MQL5: Сетевые функции / WebRequest
Документация по MQL5: Сетевые функции / WebRequest
  • www.mql5.com
Для использования функции WebRequest() следует добавить адреса серверов в список разрешенных URL во вкладке "Советники" окна "Настройки". Порт сервера выбирается автоматически на основе указанного протокола - 80 для "http://" и 443 для "https://". Функция WebRequest() является синхронной, это означает, что она приостанавливает выполнение...
 
Fedor Arkhipov:

Maxim, maybe you can tell me how to make a query?

the PUT method of the web socket protocol. It is two-way and can send messages/requests from client.

Inside it (for hibou) you put a json with the request, where you just specify the stream you want to receive. One of the response messages will contain confirmation (or error code) and the data stream will follow.


I can't say, how to make it easy in C# :-) It's too much code;

 
Renat Akhtyamov:

maybe that's where you should have started?

https://www.mql5.com/ru/docs/network/webrequest

webrequest does not support persistent connection and therefore websocket does not work on top of it.

You can overlay TcpSocket, but you have to render http by hand and it's unlikely that anyone can overlay TLS in MQL to get a WSS

 
Looking forward to nodejs education
 
Maxim Kuznetsov:

you can overlay TcpSocket, but you have to perform http by hand and it's unlikely that anyone can implement TLS in MQL to have WSS

Isn't it enough to support TLS at the socket API level?

 
Stanislav Korotky:

Isn't TLS support at socket API level enough?

We put half of our own HTTP/HTTPS/TLS engine into SocketXXXX functions.

Perhaps we'll add CSocketWeb class with HTTP/HTTPS/WSS functionality to the standard library, so that we can control 100% of network operations from MQL5.

 
Renat Fatkhullin:

We put half of our own HTTP/HTTPS/TLS engine into SocketXXXX functions.

We may add CSocketWeb class with HTTP/HTTPS/WSS functionality to the standard library, so that we can control 100% of network operations from MQL5.

That would be perfect!
 
Renat Fatkhullin:

We put half of our own HTTP/HTTPS/TLS engine into SocketXXXX functions.

Perhaps we'll add CSocketWeb class with HTTP/HTTPS/WSS functionality to the standard library, so that we can control 100% of network operations from MQL5.

and the OnSocket () event?

 
Andrey Dik:

and the OnSocket () event?

No, this is a synchronous object.