Add function monitor network connection.