Connect to the server with timeout control.
[in] Domain name of the server you want to connect to or its IP address.
[in] Connection port number.
[in] Connection timeout in milliseconds. If connection is not established within that time interval, attempts are stopped.
If connection is successful, return true, otherwise false.
Connection address should be added to the list of allowed ones on the client terminal side (Tools \ Options \ Expert Advisors).
If connection fails, error 5272 (ERR_NETSOCKET_CANNOT_CONNECT) is written to _LastError.
The function can be called only from Expert Advisors and scripts, as they run in their own execution threads. If calling from an indicator, GetLastError() returns the error 4014 – "Function is not allowed for call".