Moved client request handle into function, fixed warning for inet_ntop