예제 #1
0
 public async override Task DrawPoints(IAsyncStreamReader <DrawPointRequest> requestStream, IServerStreamWriter <DrawPoint> responseStream, ServerCallContext context)
 {
     _broadcastService.AddReceiver(responseStream, requestStream.Current.Id);
     while (await requestStream.MoveNext())
     {
         _broadcastService.AddPoint(requestStream.Current.DrawPoint, requestStream.Current.Id);
     }
     _broadcastService.RemoveReceiver(requestStream.Current.Id);
 }