React to CoreFxLab changes (#225)
This commit is contained in:
parent
6f33ebc1f5
commit
28455f647e
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Sockets
|
||||||
|
|
||||||
// Write the length as a string
|
// Write the length as a string
|
||||||
int written = 0;
|
int written = 0;
|
||||||
if (!length.TryFormat(buffer, out int lengthLen, default(TextFormat), EncodingData.InvariantUtf8))
|
if (!length.TryFormat(buffer, out int lengthLen, default(TextFormat), TextEncoder.Utf8))
|
||||||
{
|
{
|
||||||
bytesWritten = 0;
|
bytesWritten = 0;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.Sockets
|
||||||
buffer = buffer.Slice(colonIndex);
|
buffer = buffer.Slice(colonIndex);
|
||||||
|
|
||||||
// Parse the length
|
// Parse the length
|
||||||
if (!PrimitiveParser.TryParseInt32(lengthSpan, out var length, out var consumedByLength, encoding: EncodingData.InvariantUtf8) || consumedByLength < lengthSpan.Length)
|
if (!PrimitiveParser.TryParseInt32(lengthSpan, out var length, out var consumedByLength, encoder: TextEncoder.Utf8) || consumedByLength < lengthSpan.Length)
|
||||||
{
|
{
|
||||||
message = default(Message);
|
message = default(Message);
|
||||||
bytesConsumed = 0;
|
bytesConsumed = 0;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ namespace Microsoft.Extensions.WebSockets.Internal
|
||||||
buffer.WriteBigEndian((ushort)Status);
|
buffer.WriteBigEndian((ushort)Status);
|
||||||
if (!string.IsNullOrEmpty(Description))
|
if (!string.IsNullOrEmpty(Description))
|
||||||
{
|
{
|
||||||
buffer.Append(Description, EncodingData.InvariantUtf8);
|
buffer.Append(Description, TextEncoder.Utf8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue