Home Forums Support Motivations around NetworkComms.Shutdown() Reply To: Motivations around NetworkComms.Shutdown()

#1400
Anonymous
Inactive

Heya David,

The motivation behind NetworkComms.Shutdown() was:

1. Ensure all open connections are gracefully closed.
2. Ensure all worker threads are shutdown.

The background worker thread is the big one really. NetworkComms.Net can make use of either synchronous or asynchronous communication methods via NetworkComms.ConnectionListenModeUseSync. Other features such as NetworkComms.CurrentNetworkLoadIncoming may spawn background threads.

To ensure that regardless of what had taken place during the lifetime of an application, it could close correctly, we created a method that would do any necessary clean-up.

Hope that answers the question.

Kind Regards,
Marc