Universal Robots Forum

How to close rpc_factory generate resources or connect once?

Hi all,
I’m not good at English.
I’m using rpc_factory in generateScript method of InstallationNodeContribution class, but how to close the xmlrpc client or connect once to xmlrpcserver, i found the script will connect multi times the xmlrpcserver, but not release?
My code just like:
InstallationNodeContribution.java
public void generateScript(ScriptWriter writer) {
String script = new String();
// fake code, not quote
script = “rpc_factory(xmlrpc, http://127.0.0.1:9002/xmlrpc)”;
writer.assign(“XMLRPC”, script);
}
Thank you for your prompt reply.

I see “The URScript Programming Language” documents, if use raw socket communication, have socket_close/ socket_open api, but use rpc, just rpc_factory api for create, I also need rpc destory api.