re-implemented MVM_socket_connect function