Change the length from char to socklen_t