Move connection function outside of to make FF happy, only accept one HELLO