Skip to content

Network Functions

Network functions

MQL5 programs can exchange data with remote servers, as well as send push notifications, emails and data via FTP.

Add an explicit message to the MQL5 program to notify a user of the need for additional configuration. You can do that via #property description, Alert or Print.

FunctionAction
SocketCreateCreate a socket with specified flags and return its handle
SocketCloseClose a socket
SocketConnectConnect to the server with timeout control
SocketIsConnectedChecks if the socket is currently connected
SocketIsReadableGet a number of bytes that can be read from a socket
SocketIsWritableCheck whether data can be written to a socket at the current time
SocketTimeoutsSet timeouts for receiving and sending data for a socket system object
SocketReadRead data from a socket
SocketSendWrite data to a socket
SocketTlsHandshakeInitiate secure TLS (SSL) connection to a specified host via TLS Handshake protocol
SocketTlsCertificateGet data on the certificate used to secure network connection
SocketTlsReadRead data from secure TLS connection
SocketTlsReadAvailableRead all available data from secure TLS connection
SocketTlsSendSend data via secure TLS connection
WebRequestSend an HTTP request to a specified server
SendFTPSend a file to an address specified on the FTP tab
SendMailSend an email to an address specified in the Email tab of the options window
SendNotificationSend push notifications to mobile terminals whose MetaQuotes IDs are specified in the Notifications tab
Last updated on