-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Use MessagePackReader \ MessagePackWriter to implement IHubProtocol for server-side Blazor #8687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talk to @Eilon about the submodule/code usage
src/SignalR/common/SignalR.Common/test/Internal/Protocol/MessagePackHubProtocolTestBase.cs
Show resolved
Hide resolved
renderBatchWriter.Write(in batch); | ||
} | ||
|
||
var batchBytes = memoryStream.ToArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid the second array allocation if you supported Memory<byte> or ArraySegment<byte>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be in SignalR?
src/Components/Server/test/Microsoft.AspNetCore.Components.Server.Tests.csproj
Outdated
Show resolved
Hide resolved
f707609
to
006f1a9
Compare
006f1a9
to
1f7ee37
Compare
🆙 📅 |
src/SignalR/common/SignalR.Common/test/Internal/Protocol/MessagePackHubProtocolTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/common/SignalR.Common/test/Internal/Protocol/MessagePackHubProtocolTests.cs
Outdated
Show resolved
Hide resolved
@@ -42,9 +42,11 @@ async function boot() { | |||
} | |||
|
|||
async function initializeConnection(circuitHandlers: CircuitHandler[]): Promise<signalR.HubConnection> { | |||
const hubProtocol = new MessagePackHubProtocol(); | |||
(hubProtocol as any).name = 'blazorpack'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😻
1f7ee37
to
913a8f1
Compare
Wrong link |
This comment was made automatically. If there is a problem contact ryanbrandenburg. I've triaged the above build. |
Hold on, I didn't sign off on this. We need 3rd Party Notices for this. |
@Eilon oops. Should I back out the change? |
Naah it's fine, I'll let you know what to add. |
Fixes #7311