added active connect function for UDP