System.Net.Mail.SmtpConnection.ReleaseConnection C# (CSharp) Method

ReleaseConnection() private method

private ReleaseConnection ( ) : void
return void
        internal void ReleaseConnection()
        {
            if (!_isClosed)
            {
                lock (this)
                {
                    if (!_isClosed && _tcpClient != null)
                    {
                        //free cbt buffer
                        if (_channelBindingToken != null)
                        {
                            _channelBindingToken.Close();
                        }

                        _networkStream.Close();
                        _tcpClient.Dispose();
                    }

                    _isClosed = true;
                }
            }

            _isConnected = false;
        }

Usage Example

Esempio n. 1
0
 internal void ReleaseConnection()
 {
     if (_connection != null)
     {
         _connection.ReleaseConnection();
     }
 }
All Usage Examples Of System.Net.Mail.SmtpConnection::ReleaseConnection