// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNetCore.SignalR.Protocol { /// /// A handshake response message. /// public class HandshakeResponseMessage : HubMessage { /// /// An empty response message with no error. /// public static readonly HandshakeResponseMessage Empty = new HandshakeResponseMessage(null); /// /// Gets the optional error message. /// public string Error { get; } /// /// Initializes a new instance of the class. /// /// An optional response error message. A null error message indicates a succesful handshake. public HandshakeResponseMessage(string error) { // Note that a response with an empty string for error in the JSON is considered an errored response Error = error; } } }