internal void SetResults(System.Net.Sockets.SocketError socketError, int bytesTransferred, System.Net.Sockets.SocketFlags flags) { this.m_SocketError = socketError; this.m_ConnectByNameError = null; this.m_BytesTransferred = bytesTransferred; this.m_SocketFlags = flags; }
internal void SetResults(Exception exception, int bytesTransferred, System.Net.Sockets.SocketFlags flags) { this.m_ConnectByNameError = exception; this.m_BytesTransferred = bytesTransferred; this.m_SocketFlags = flags; if (exception == null) { this.m_SocketError = System.Net.Sockets.SocketError.Success; } else { SocketException exception2 = exception as SocketException; if (exception2 != null) { this.m_SocketError = exception2.SocketErrorCode; } else { this.m_SocketError = System.Net.Sockets.SocketError.SocketError; } } }