Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ShutdownConnection()

void System.Net.Mail.SmtpConnection.ShutdownConnection ( bool isAbort)
inlineprivate

Definition at line 631 of file SmtpConnection.cs.

632 {
633 if (!_isClosed)
634 {
635 lock (this)
636 {
637 if (!_isClosed && _tcpClient != null)
638 {
639 try
640 {
641 try
642 {
643 if (isAbort)
644 {
645 _tcpClient.LingerState = new LingerOption(enable: true, 0);
646 }
647 else
648 {
649 _tcpClient.Client.Blocking = false;
650 QuitCommand.Send(this);
651 }
652 }
653 finally
654 {
657 }
658 }
659 catch (IOException)
660 {
661 }
662 catch (ObjectDisposedException)
663 {
664 }
665 }
666 _isClosed = true;
667 }
668 }
669 _isConnected = false;
670 }
virtual void Dispose(bool disposing)
Definition TcpClient.cs:410

References System.Net.Mail.SmtpConnection._isClosed, System.Net.Mail.SmtpConnection._isConnected, System.Net.Mail.SmtpConnection._networkStream, System.Net.Mail.SmtpConnection._tcpClient, System.Net.Sockets.NetworkStream.Close(), System.Net.Sockets.TcpClient.Dispose(), and System.Net.Mail.QuitCommand.Send().

Referenced by System.Net.Mail.SmtpConnection.Abort(), and System.Net.Mail.SmtpConnection.ReleaseConnection().