add connect to lua function support.