do not use socket.sendall

socket.sendall is not compatible with non blocking connections