Disconnect Method

void Disconnect()

Summary

This method closes the connection to the ETH32 device and cleans up all of the resources within the API that were used for the connection. After this method returns, most of the methods and properties of the object won't be able to be successfully used until another connection has been formed using the Connect Method.

Parameters

This method does not have any parameters.

Return Value

This method does not return a value.

Remarks

You should be careful to always call this method when you are finished using the device. The device has a limited number of connections it can support and if you do not disconnect and your application continues executing, you will continue using one of those connections. If you fail to call this method, your connections will remain open potentially until your application terminates.

In this .NET class, an object's connection is automatically closed at the time of garbage collection if it is not already disconnected. However, you should never depend on .NET garbage collection to do this because .NET garbage collection is non-deterministic. This means that garbage collection may occur at a much later time than when you cease using an object. Depending on the memory usage of your application, garbage collection may not occur until your application terminates.

See Also

Connect Method, Connected Property