Skip to content

Commit 4ceed81

Browse files
rosieksSteveSandersonMS
authored andcommitted
Removed unused methods
1 parent 6d85e75 commit 4ceed81

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
2121
/// <seealso cref="Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance" />
2222
internal class HttpNodeInstance : OutOfProcessNodeInstance
2323
{
24-
private readonly static int streamBufferSize = 16 * 1024;
2524
private static readonly Regex PortMessageRegex =
2625
new Regex(@"^\[Microsoft.AspNetCore.NodeServices.HttpNodeHost:Listening on port (\d+)\]$");
2726

@@ -140,28 +139,6 @@ protected override void Dispose(bool disposing)
140139
}
141140
}
142141

143-
private static async Task<T> ReadJsonAsync<T>(Stream stream, CancellationToken cancellationToken)
144-
{
145-
var json = Encoding.UTF8.GetString(await ReadAllBytesAsync(stream, cancellationToken));
146-
return JsonConvert.DeserializeObject<T>(json, jsonSerializerSettings);
147-
}
148-
149-
private static async Task<byte[]> ReadAllBytesAsync(Stream input, CancellationToken cancellationToken)
150-
{
151-
byte[] buffer = new byte[streamBufferSize];
152-
153-
using (var ms = new MemoryStream())
154-
{
155-
int read;
156-
while ((read = await input.ReadAsync(buffer, 0, buffer.Length, cancellationToken)) > 0)
157-
{
158-
ms.Write(buffer, 0, read);
159-
}
160-
161-
return ms.ToArray();
162-
}
163-
}
164-
165142
#pragma warning disable 649 // These properties are populated via JSON deserialization
166143
private class RpcJsonResponse
167144
{

0 commit comments

Comments
 (0)