BACnet.IP.UDPAsyncServer.Dispose C# (CSharp) Method

Dispose() public method

Disposes the UDPAsyncServer instance
public Dispose ( ) : void
return void
        public void Dispose()
        {
            lock (_lock)
            {
                _disposeAll();
            }
        }

Usage Example

Example #1
0
        /// <summary>
        /// Disposes all of the resources held by an open port, in preparation
        /// for transitioning back to a closed state
        /// </summary>
        private void _disposeAll()
        {
            if (_registrationTimer != null)
            {
                _registrationTimer.Dispose();
                _registrationTimer = null;
            }

            if (_server != null)
            {
                _server.Dispose();
                _server = null;
            }
        }