Increase the size of the WebSockets buffer to 4K. (#448)

This commit is contained in:
Mikael Mengistu 2017-05-15 13:14:45 -04:00 committed by GitHub
parent 06e3a08ac0
commit 04863032a2
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
while (!cancellationToken.IsCancellationRequested) while (!cancellationToken.IsCancellationRequested)
{ {
const int bufferSize = 1024; const int bufferSize = 4096;
var totalBytes = 0; var totalBytes = 0;
var incomingMessage = new List<ArraySegment<byte>>(); var incomingMessage = new List<ArraySegment<byte>>();
WebSocketReceiveResult receiveResult; WebSocketReceiveResult receiveResult;

View File

@ -142,8 +142,8 @@ namespace Microsoft.AspNetCore.SignalR.Tests
{ {
get get
{ {
yield return new object[] { new string('A', 5 * 1024) }; yield return new object[] { new string('A', 5 * 4096) };
yield return new object[] { new string('A', 5 * 1024 * 1024 + 32) }; yield return new object[] { new string('A', 1000 * 4096 + 32) };
} }
} }