Пример #1
0
        /// <summary>
        /// Cleanup resources
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing && _tpsocket != null)
            {
                if (_tpsocket.Connected)
                {
                    _tpsocket.Disconnect(false);
                }

                _tpsocket.Dispose();
            }
        }
Пример #2
0
        // Dispose of Socket
        public void Dispose()
        {
            if (_tpsocket != null)
            {
                if (_tpsocket.Connected)
                {
                    _tpsocket.Disconnect(false);
                }

                _tpsocket.Dispose();
            }
        }