re-implemented MVM_socket_bind function