pr feedback

This commit is contained in:
Andrew Stanton-Nurse 2019-02-26 15:42:06 -08:00
parent 8c2c458891
commit 22e706cdc3
2 changed files with 10 additions and 14 deletions

View File

@ -64,11 +64,12 @@ namespace Microsoft.AspNetCore.SignalR.Client
private int _serverProtocolMinorVersion; private int _serverProtocolMinorVersion;
/// <summary> /// <summary>
/// Occurs when the connection is closed, either by a call to <see cref="StopAsync(CancellationToken)"/> or a connection error. /// Occurs when the connection is closed. The connection could be closed due to an error or due to either the server or client intentionally
/// closing the connection without error.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// If this event was triggered from a connection error, the <see cref="Exception"/> that occurred will be passed in as the /// If this event was triggered from a connection error, the <see cref="Exception"/> that occurred will be passed in as the
/// sole argument to this handler. If this event was triggered from a call to <see cref="StopAsync(CancellationToken)"/>, then /// sole argument to this handler. If this event was triggered intentionally by either the client or server, then
/// the argument will be <see langword="null"/>. /// the argument will be <see langword="null"/>.
/// </remarks> /// </remarks>
/// <example> /// <example>
@ -76,7 +77,8 @@ namespace Microsoft.AspNetCore.SignalR.Client
/// if there was an error: /// if there was an error:
/// ///
/// <code> /// <code>
/// connection.Closed += (exception) => { /// connection.Closed += (exception) =>
/// {
/// if (exception == null) /// if (exception == null)
/// { /// {
/// Console.WriteLine("Connection closed without error."); /// Console.WriteLine("Connection closed without error.");
@ -1010,17 +1012,11 @@ namespace Microsoft.AspNetCore.SignalR.Client
} }
} }
/// <summary>
/// This method is for internal framework use and should not be called by user code.
/// </summary>
public void ResetSendPing() public void ResetSendPing()
{ {
Volatile.Write(ref _nextActivationSendPing, (DateTime.UtcNow + KeepAliveInterval).Ticks); Volatile.Write(ref _nextActivationSendPing, (DateTime.UtcNow + KeepAliveInterval).Ticks);
} }
/// <summary>
/// This method is for internal framework use and should not be called by user code.
/// </summary>
public void ResetTimeout() public void ResetTimeout()
{ {
Volatile.Write(ref _nextActivationServerTimeout, (DateTime.UtcNow + ServerTimeout).Ticks); Volatile.Write(ref _nextActivationServerTimeout, (DateTime.UtcNow + ServerTimeout).Ticks);

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Http.Connections
/// Gets the <see cref="HttpContext"/> associated with the connection, if there is one. /// Gets the <see cref="HttpContext"/> associated with the connection, if there is one.
/// </summary> /// </summary>
/// <param name="connection">The <see cref="ConnectionContext"/> representing the connection.</param> /// <param name="connection">The <see cref="ConnectionContext"/> representing the connection.</param>
/// <returns>The <see cref="HttpContext"/> associated with the connection, or <see langword="null"/> if the connection is not HTTP-based</returns> /// <returns>The <see cref="HttpContext"/> associated with the connection, or <see langword="null"/> if the connection is not HTTP-based.</returns>
/// <remarks> /// <remarks>
/// SignalR connections can run on top of HTTP transports like WebSockets or Long Polling, or other non-HTTP transports. As a result, /// SignalR connections can run on top of HTTP transports like WebSockets or Long Polling, or other non-HTTP transports. As a result,
/// this method can sometimes return <see langword="null"/> depending on the configuration of your application. /// this method can sometimes return <see langword="null"/> depending on the configuration of your application.