Thanks, but i was wondering if there any method to check if some number is a socket descriptor, instead of working with range of numbers;
Your updated part of post is very good method, thanks, it's very helpful!
Would be nice if there are some more methods.