Reorganization

This commit is contained in:
watsonb8
2019-07-05 14:17:09 -04:00
parent a01d399a1f
commit ec6a7586c7
76 changed files with 475 additions and 296 deletions

View File

@ -0,0 +1,38 @@
using System;
using System.Threading.Tasks;
using System.IO;
using Aurora.Proto;
using Aurora.Models;
namespace Aurora.RemoteImpl
{
public class RemotePlaybackServiceImpl : RemotePlaybackService.RemotePlaybackServiceBase
{
public RemotePlaybackServiceImpl()
{
}
public override async Task GetPartyStream(Empty empty,
Grpc.Core.IServerStreamWriter<Chunk> responseStream,
Grpc.Core.ServerCallContext context)
{
throw new NotImplementedException("Working on it");
// //Send stream
// string cwd = Directory.GetCurrentDirectory();
// using (FileStream fs = System.IO.File.OpenRead(Path.Combine(cwd, request.FileName)))
// {
// Console.WriteLine("Begin sending file");
// byte[] buffer = new byte[2048]; // read in chunks of 2KB
// int bytesRead;
// while ((bytesRead = fs.Read(buffer, 0, buffer.Length)) > 0)
// {
// Google.Protobuf.ByteString bufferByteString = Google.Protobuf.ByteString.CopyFrom(buffer);
// await responseStream.WriteAsync(new Chunk { Content = bufferByteString });
// }
// Console.WriteLine("Done sending file");
// };
}
}
}