Get a number of bytes that can be read from a socket.
Number of bytes that can be read. In case of an error, 0 is returned.
If an error occurs on a system socket when executing the function, connection established via SocketConnect is discontinued.
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".