re-implemented MVM_socket_close/MVM_socket_send_string function