UDPSocket.close
js
UDPSocket.close()Closes the UDP Socket instance, equivalent to destroying it.
After closing, the UDP Socket instance can no longer send messages. Each call to UDPSocket.send will trigger the error event, and the message event callback function will no longer be executed.
After a UDPSocket instance is created, it is strongly referenced by Native to ensure it is not garbage collected.
After UDPSocket.close, the strong reference is released, allowing the UDPSocket instance to be subject to GC.
