Events working model + full stunnel implementation