--added exception handling
--added connection lost handling
--better way of blocking read from socket - Poll socket, cancel operation max timeout - 100 ms