System.Net.Sockets.SocketAsyncEventArgs.FinishConnectByNameSyncFailure C# (CSharp) Method

FinishConnectByNameSyncFailure() private method

private FinishConnectByNameSyncFailure ( Exception exception, int bytesTransferred, SocketFlags flags ) : void
exception Exception
bytesTransferred int
flags SocketFlags
return void
        internal void FinishConnectByNameSyncFailure(Exception exception, int bytesTransferred, SocketFlags flags)
        {
            SetResults(exception, bytesTransferred, flags);

            if (_currentSocket != null)
            {
                _currentSocket.UpdateStatusAfterSocketError(_socketError);
            }

            Complete();
        }

Usage Example

Example #1
0
        private void SyncFail(Exception e)
        {
            OnFail(false);

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

            SocketException socketException = e as SocketException;
            if (socketException != null)
            {
                _userArgs.FinishConnectByNameSyncFailure(socketException, 0, SocketFlags.None);
            }
            else
            {
                ExceptionDispatchInfo.Throw(e);
            }
        }
All Usage Examples Of System.Net.Sockets.SocketAsyncEventArgs::FinishConnectByNameSyncFailure
SocketAsyncEventArgs