Create a socket with specified flags and return its handle.
[in] Combination of flags defining the mode of working with a socket. Currently, only one flag is supported — SOCKET_DEFAULT.
In case of a successful socket creation, return its handle, otherwise INVALID_HANDLE.
To free up computer memory from an unused socket, call SocketClose for it.
You can create a maximum of 128 sockets from one MQL5 program. If the limit is exceeded, the error 5271 (ERR_NETSOCKET_TOO_MANY_OPENED) 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".