Fixed ssl read and write to better work with epoll