Adding timeout to server's socket receive