8 types derived from HubMessage
Microsoft.AspNetCore.SignalR.Common (8)
Protocol\AckMessage.cs (1)
9public sealed class AckMessage : HubMessage
Protocol\CloseMessage.cs (1)
12public class CloseMessage : HubMessage
Protocol\HandshakeRequestMessage.cs (1)
9public class HandshakeRequestMessage : HubMessage
Protocol\HandshakeResponseMessage.cs (1)
9public class HandshakeResponseMessage : HubMessage
Protocol\HubInvocationMessage.cs (1)
11public abstract class HubInvocationMessage : HubMessage
Protocol\PingMessage.cs (1)
9public class PingMessage : HubMessage
Protocol\SequenceMessage.cs (1)
9public sealed class SequenceMessage : HubMessage
Protocol\StreamBindingFailureMessage.cs (1)
17public class StreamBindingFailureMessage : HubMessage
109 references to HubMessage
Microsoft.AspNetCore.Components.Server (11)
BlazorPack\BlazorPackHubProtocol.cs (3)
39public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, out HubMessage message) 43public void WriteMessage(HubMessage message, IBufferWriter<byte> output) 47public ReadOnlyMemory<byte> GetMessageBytes(HubMessage message)
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (8)
28public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 41private HubMessage? ParseMessage(ref MessagePackReader reader, IInvocationBinder binder) 73private HubMessage CreateInvocationMessage(ref MessagePackReader reader, IInvocationBinder binder, int itemCount) 109private HubMessage CreateStreamInvocationMessage(ref MessagePackReader reader, IInvocationBinder binder, int itemCount) 139private HubMessage CreateStreamItemMessage(ref MessagePackReader reader, IInvocationBinder binder) 335public void WriteMessage(HubMessage message, IBufferWriter<byte> output) 357public ReadOnlyMemory<byte> GetMessageBytes(HubMessage message) 387private void WriteMessageCore(HubMessage message, ref MessagePackWriter writer)
Microsoft.AspNetCore.SignalR.Client.Core (14)
HubConnection.cs (6)
1207private async Task SendHubMessage(ConnectionState connectionState, HubMessage hubMessage, CancellationToken cancellationToken = default) 1269private async Task SendWithLock(ConnectionState expectedConnectionState, HubMessage message, CancellationToken cancellationToken, [CallerMemberName] string callerName = "") 1287private async Task<CloseMessage?> ProcessMessagesAsync(HubMessage message, ConnectionState connectionState, ChannelWriter<InvocationMessage> invocationMessageWriter) 1656while (_protocol.TryParseMessage(ref buffer, connectionState, out var message)) 2301public async ValueTask<FlushResult> WriteAsync(HubMessage message, CancellationToken cancellationToken) 2321public bool ShouldProcessMessage(HubMessage message)
HubConnection.Log.cs (2)
36public static void SendingMessage(ILogger logger, HubMessage message) 57public static void MessageSent(ILogger logger, HubMessage message)
Internal\SerializedHubMessage.cs (4)
26public HubMessage? Message { get; } 46public SerializedHubMessage(HubMessage message) 52/// Gets the serialized representation of the <see cref="HubMessage"/> using the specified <see cref="IHubProtocol"/>. 55/// <returns>The serialized representation of the <see cref="HubMessage"/>.</returns>
src\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (2)
129public ValueTask<FlushResult> WriteAsync(HubMessage hubMessage, CancellationToken cancellationToken) 218internal bool ShouldProcessMessage(HubMessage message)
Microsoft.AspNetCore.SignalR.Common (9)
Protocol\HubProtocolExtensions.cs (2)
14/// Converts the specified <see cref="HubMessage"/> to its serialized representation. 19public static byte[] GetMessageBytes(this IHubProtocol hubProtocol, HubMessage message)
Protocol\IHubProtocol.cs (7)
32/// Creates a new <see cref="HubMessage"/> from the specified serialized representation, and using the specified binder. 37/// <returns>A value that is <c>true</c> if the <see cref="HubMessage"/> was successfully parsed; otherwise, <c>false</c>.</returns> 38bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message); 41/// Writes the specified <see cref="HubMessage"/> to a writer. 45void WriteMessage(HubMessage message, IBufferWriter<byte> output); 48/// Converts the specified <see cref="HubMessage"/> to its serialized representation. 52ReadOnlyMemory<byte> GetMessageBytes(HubMessage message);
Microsoft.AspNetCore.SignalR.Core (20)
DefaultHubLifetimeManager.cs (2)
196var message = CreateInvocationMessage(methodName, args); 280private static HubMessage CreateInvocationMessage(string methodName, object?[] args)
HubConnectionContext.cs (8)
175/// Write a <see cref="HubMessage"/> to the connection. 177/// <param name="message">The <see cref="HubMessage"/> being written.</param> 181public virtual ValueTask WriteAsync(HubMessage message, CancellationToken cancellationToken = default) 186internal ValueTask WriteAsync(HubMessage message, bool ignoreAbort, CancellationToken cancellationToken = default) 268private ValueTask<FlushResult> WriteCore(HubMessage message, CancellationToken cancellationToken) 277HubMessage message, CancellationToken cancellationToken) 375private async Task WriteSlowAsync(HubMessage message, bool ignoreAbort, CancellationToken cancellationToken) 839internal bool ShouldProcessMessage(HubMessage message)
HubConnectionHandler.cs (2)
289while (protocol.TryParseMessage(ref buffer, binder, out var message)) 318if (protocol.TryParseMessage(ref segment, binder, out var message))
Internal\DefaultHubDispatcher.cs (1)
154public override Task DispatchMessageAsync(HubConnectionContext connection, HubMessage hubMessage)
Internal\HubDispatcher.cs (1)
13public abstract Task DispatchMessageAsync(HubConnectionContext connection, HubMessage hubMessage);
SerializedHubMessage.cs (4)
22public HubMessage? Message { get; } 42public SerializedHubMessage(HubMessage message) 50/// Gets the serialized representation of the <see cref="HubMessage"/> using the specified <see cref="IHubProtocol"/>. 53/// <returns>The serialized representation of the <see cref="HubMessage"/>.</returns>
src\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (2)
129public ValueTask<FlushResult> WriteAsync(HubMessage hubMessage, CancellationToken cancellationToken) 218internal bool ShouldProcessMessage(HubMessage message)
Microsoft.AspNetCore.SignalR.Protocols.Json (13)
Protocol\JsonHubProtocol.cs (13)
89public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 103public void WriteMessage(HubMessage message, IBufferWriter<byte> output) 110public ReadOnlyMemory<byte> GetMessageBytes(HubMessage message) 115private HubMessage? ParseMessage(ReadOnlySequence<byte> input, IInvocationBinder binder) 348HubMessage message; 516private void WriteMessageCore(HubMessage message, IBufferWriter<byte> stream) 728private static HubMessage BindCancelInvocationMessage(string? invocationId) 738private static HubMessage BindCompletionMessage(string invocationId, string? error, object? result, bool hasResult) 758private static HubMessage BindStreamItemMessage(string invocationId, object? item, bool hasItem) 773private static HubMessage BindStreamInvocationMessage(string? invocationId, string target, 796private static HubMessage BindInvocationMessage(string? invocationId, string target, 904private static HubMessage ApplyHeaders(HubMessage message, Dictionary<string, string>? headers)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (11)
Protocol\MessagePackHubProtocol.cs (3)
60public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 64public void WriteMessage(HubMessage message, IBufferWriter<byte> output) 68public ReadOnlyMemory<byte> GetMessageBytes(HubMessage message)
Protocol\MessagePackHubProtocolWorker.cs (8)
28public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 41private HubMessage? ParseMessage(ref MessagePackReader reader, IInvocationBinder binder) 73private HubMessage CreateInvocationMessage(ref MessagePackReader reader, IInvocationBinder binder, int itemCount) 109private HubMessage CreateStreamInvocationMessage(ref MessagePackReader reader, IInvocationBinder binder, int itemCount) 139private HubMessage CreateStreamItemMessage(ref MessagePackReader reader, IInvocationBinder binder) 335public void WriteMessage(HubMessage message, IBufferWriter<byte> output) 357public ReadOnlyMemory<byte> GetMessageBytes(HubMessage message) 387private void WriteMessageCore(HubMessage message, ref MessagePackWriter writer)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (13)
Protocol\NewtonsoftJsonHubProtocol.cs (13)
79public bool TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, [NotNullWhen(true)] out HubMessage? message) 102public void WriteMessage(HubMessage message, IBufferWriter<byte> output) 109public ReadOnlyMemory<byte> GetMessageBytes(HubMessage message) 114private HubMessage? ParseMessage(Utf8BufferTextReader textReader, IInvocationBinder binder) 338HubMessage message; 513private void WriteMessageCore(HubMessage message, IBufferWriter<byte> stream) 721private static HubMessage BindCancelInvocationMessage(string? invocationId) 731private static HubMessage BindCompletionMessage(string invocationId, string? error, object? result, bool hasResult) 751private static HubMessage BindStreamItemMessage(string invocationId, object? item, bool hasItem) 766private static HubMessage BindStreamInvocationMessage(string? invocationId, string target, object?[]? arguments, bool hasArguments, string[]? streamIds) 788private static HubMessage BindInvocationMessage(string? invocationId, string target, object?[]? arguments, bool hasArguments, string[]? streamIds) 927private static HubMessage ApplyHeaders(HubMessage message, Dictionary<string, string>? headers)
Microsoft.AspNetCore.SignalR.Specification.Tests (15)
src\aspnetcore\src\SignalR\common\testassets\Tests.Utils\HubConnectionContextUtils.cs (1)
49public override ValueTask WriteAsync(HubMessage message, CancellationToken cancellationToken = default)
src\aspnetcore\src\SignalR\common\testassets\Tests.Utils\TestClient.cs (14)
91public Task<IList<HubMessage>> StreamAsync(string methodName, params object[] args) 96public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, params object[] args) 102public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args) 108public async Task<IList<HubMessage>> ListenAllAsync(string invocationId) 110var result = new List<HubMessage>(); 111await foreach (var item in ListenAsync(invocationId)) 118public async IAsyncEnumerable<HubMessage> ListenAsync(string invocationId) 122var message = await ReadAsync(); 155var message = await ReadAsync(); 232public async Task<string> SendHubMessageAsync(HubMessage message) 240public async Task<HubMessage> ReadAsync(bool isHandshake = false) 244var message = TryRead(isHandshake); 275public HubMessage TryRead(bool isHandshake = false) 288if (_protocol.TryParseMessage(ref buffer, _invocationBinder, out var message))
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\DefaultHubMessageSerializer.cs (1)
27public IReadOnlyList<SerializedMessage> SerializeMessage(HubMessage message)
Internal\RedisProtocol.cs (1)
230private void WriteHubMessage(ref MessagePackWriter writer, HubMessage message)
RedisHubLifetimeManager.cs (1)
667HubMessage? hubMessage = null;